scatter-plot

Python Scatter Plot with Colorbar and Legend Issues

三世轮回 提交于 2020-01-14 02:51:26
问题 I'm working with a pretty simple example. I create three scatter plots on the same set of axes, and each data set I plot has a different associated colormap. However, the legend does not look as I'd want it to; why is this? import numpy as np import matplotlib.pyplot as plt t = np.linspace(0,10,100) x = np.random.rand(100,3) y = np.random.rand(100,3) colmaps = ['Blues', 'Greys', 'Reds'] for i in range(3): plt.scatter(x[:,i], y[:,i], c=t, cmap=colmaps[i], label=i) plt.legend() plt.show() This

matplotlib scatter fails with error: 'c' argument has n elments, which is not acceptable for use with 'x' with size n, 'y' with size n

依然范特西╮ 提交于 2020-01-10 05:10:08
问题 I am trying to create a scatter plot using matplotlib where each point has a specific color value. I scale the values and then apply alpha blending between a 'left' and a 'right' color. # initialization from matplotlib import pyplot as plt from sklearn.preprocessing import MinMaxScaler import numpy as np values = np.random.rand(1134) # actual code colorLeft = np.array([112, 224, 112]) colorRight = np.array([224, 112, 112]) scaled = MinMaxScaler().fit_transform(values.reshape(-1, 1)) colors =

MPAndroidChart Scatter Chart data point markers and connecting the dots

 ̄綄美尐妖づ 提交于 2020-01-06 20:14:57
问题 I am using MPAndroidChart. In an application for scatter data I want to have the data points connected by a line and disable the automatic labels that show up when I plot just a few points. I've listed my code below for reference, Is this possible? Thanks public class StaticPlottingFragment extends Fragment { private static String TAG = "file_plotting_fragment"; private Typeface tf; private int count = 100; private LinkedList<DataPoint> mDataPoints; public static StaticPlottingFragment

Highchart 3d: Chart graph. Zaxis alignment issue

断了今生、忘了曾经 提交于 2020-01-06 07:24:15
问题 I am working on a 3d scatter plot chart. But facing issues with setting up the position of z axis label. Kindly help me in getting it back in proper position. Thanks in advance. I tried to play around with the zaxis values but no luck. zAxis: { min: 0, max: 11, gridLineColor: 'white', categories: ['W', '1', '2', '3c', '3b', '3a', '4c', '4b', '4a', '5c', '5b', '5a'], labels: { y: 1, rotation: 30, align: 'center' } } JS Fiddle link : http://jsfiddle.net/suprcool01/xvdcqbyk/24/ 来源: https:/

MS Excel Scatterplot converts Months to Numbers

﹥>﹥吖頭↗ 提交于 2020-01-06 05:09:09
问题 Software: MS Excel 2016 Link to files: GitHub Repository Sheet2 of month.xlsx has table When I select it and Insert Scatterplot, Chart1 of month.xlsx is the result. No matter what I try, I cannot get the X-Axis to display in Months (right now it displays Month's number). Help! 回答1: The problem is most likely the way you have your months stored. By the looks of things I would hazard to guess they are actually text and not numbers formatted to display the name of the month in full. In order to

Restructuring a data frame for 3D plots in R

匆匆过客 提交于 2020-01-05 08:07:33
问题 I realize often times that 3D plots are not the most efficient way to present a set of data, but previous 2D plots I've made for a particular dataset seem to indicate that a 3D plot would help to break the information into more distinct clusters for analysis. That being said, I've never done this in R and I'm having trouble restructuring my data frame before making a 3D scatterplot using plot3d(). At the moment, my data frame has 2 columns and a few thousand rows of information. Column one is

Restructuring a data frame for 3D plots in R

女生的网名这么多〃 提交于 2020-01-05 08:06:32
问题 I realize often times that 3D plots are not the most efficient way to present a set of data, but previous 2D plots I've made for a particular dataset seem to indicate that a 3D plot would help to break the information into more distinct clusters for analysis. That being said, I've never done this in R and I'm having trouble restructuring my data frame before making a 3D scatterplot using plot3d(). At the moment, my data frame has 2 columns and a few thousand rows of information. Column one is

Restructuring a data frame for 3D plots in R

本秂侑毒 提交于 2020-01-05 08:06:11
问题 I realize often times that 3D plots are not the most efficient way to present a set of data, but previous 2D plots I've made for a particular dataset seem to indicate that a 3D plot would help to break the information into more distinct clusters for analysis. That being said, I've never done this in R and I'm having trouble restructuring my data frame before making a 3D scatterplot using plot3d(). At the moment, my data frame has 2 columns and a few thousand rows of information. Column one is

d3.js legend overlapping chart area

浪尽此生 提交于 2020-01-05 04:32:08
问题 I'm pretty new to D3.js (I'm a R programmer). I'm trying to create a scatter and put a legend in the right bottom. However, it's overlapping with chart area. I've been trying to take some examples in internet with no lucky. When I try to move it to the right, the names and/or symbols are not visible. I want to place the legend outside the chart frame, so it won't overlap. Any help is appreciated. Here's what I tried so far: d3.csv('https://gist.githubusercontent.com/netj/8836201/raw

Creating scatter plot by ggplot for long format data

倖福魔咒の 提交于 2020-01-04 09:15:12
问题 I have worked on a long format data.frame with different number of entities in each condition like this: Condition rating Control 2.1596456 Control 0.2385878 Control 3.0042808 Control 5.8012919 Treatment1 5.7561241 Treatment1 0.1879127 Treatment20 0.3968469 Treatment20 3.9423182 As I find out ggplot creates scatter plot usually for wide format data not long ones. How can I create a pair scatter plot for this data.frame? (e.g. Control-Treatment1 and Treatment1-Treatment20) Thanks is advance.