python,matplotlib,pandas,scatter

What you're doing will almost work, but you have to pass color a vector of colors, not just a vector of variables. So you could do: color = df.Group.map({dut_groups[0]: "r", dut_groups[1]: "b"}) plt.scatter(x, y, color=color) Same goes for the marker style You could also use seaborn to do the color-mapping...

python,matplotlib,marker,scatter

Try this: x = np.random.rand(10) y = np.random.rand(10) numbers = np.arange(len(x)) for i in range(len(x)): plt.text(x[i], y[i], numbers[i]) ...

You could create a data frame with the year in one column and the value in the other, and then you could plot that the appropriate columns: b <- data.frame(year=as.numeric(rep(names(a), sapply(a, length))), val=unlist(a)) plot(b) ...

python,matplotlib,label,scatter

Assuming that you aren't plotting many scatter points, you could just do a scatter for every point: import numpy as np; import matplotlib.pyplot as plt y = np.arange(10) # points to plot x=np.arange(10) labels = np.arange(10) # labels of the points fig, ax = plt.subplots(nrows=1, ncols=1) for x_,y_,label in zip(x,y,labels):...

Well its possible to generate a list of time having only the minute and second. You need to change the format to '%M:%S'. Next you need to change the labels using the plt.xticks(). I changed for x axis. Here is a sample start = datetime.combine(date.today(), time(0, 0)) axis_times = []...

What if you treat all values as one long vector? You would basically skip the country element and treat them all as growth and trade regardless of country. % //Make all data points one long vector as all points represent the same thing trade = reshape (trade,[1 prod(size(trade))]); growth =...

matlab,colors,matlab-figure,scatter-plot,scatter

you are telling matlab to plot only n points ((1,1), (2,2), ..., (n,n)) where you want actually the cartesian product (1:nX1:n). Try [X,Y] = meshgrid(1:n,1:n); scatter(X(:), Y(:), 10, data(:));...

python,time,matplotlib,scatter

I generated a few more rows of data to make the problem, at least on my end, a bit more meaningful. What solved this for me was generating a 5th column (in code, not the csv) which is the number of minutes corresponding to a particular o'clock time, i.e. 11:59...

python,numpy,matplotlib,median,scatter

I would use np.digitize to do the bin sorting for you. This way you can easily apply any function and set the range you are interested in. import numpy as np import pylab as plt N = 2000 total_bins = 10 # Sample data X = np.random.random(size=N)*10 Y = X**2...

python,matplotlib,scatter,mplot3d

You can set the edgecolor and facecolor separately, like this: import numpy as np from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt def randrange(n, vmin, vmax): return (vmax-vmin)*np.random.rand(n) + vmin fig = plt.figure() ax = fig.add_subplot(111, projection='3d') n = 100 for c, m, zl, zh in [('r', 'o', -50, -25),...

I figured it out. calling figure.clear() before figure.add_subplot() is necessary to make sure all visual artifacts get deleted.

java,charts,javafx,scatter,javafx-css

You can get all the nodes with the same styleclass using the lookupAll() of the Node. Set<Node> nodes = scatterChart.lookupAll(".series0"); // series0 is the style class for first series for (Node n : nodes) { n.setStyle("-fx-background-color: blue;"); } Use this method after the stage is visible. Or you can call...

matlab,colors,matlab-figure,scatter-plot,scatter

As told in the comment, scatter can take a 4th argument which will represent the color. The 3rd argument (the one you use with c for each of your scatter plot), only controls the size. For you, the way to call scatter should be: scatter(x,y, size, colour , 'filled') Read...

As in the 2D case, you need to draw the spheres yourself. If you want nicely shaped spheres this means to draw many patches and thus gets slow quite quickly. Here's a basic way of doing it: from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import numpy as np def...

python,matplotlib,colorbar,scatter

I think you are looking for vmin and vmax , for example ax.scatter(x, y, z, c=values, alpha=0.3, edgecolors='none',vmin=2100,vmax=2600) ...

There are a number of ways to create DataFrames. Given 1-dimensional column vectors, you can create a DataFrame by passing it a dict whose keys are column names and whose values are the 1-dimensional column vectors: import numpy as np import pandas as pd x = np.random.randn(5) y = np.sin(x)...

Although the documentation states that MarkerStyle is the type to pass for marker=, this doesn't seem to be implemented correctly. This bug has been reported on GitHub. plt.plot(x, y, marker='o', markersize=100, fillstyle='bottom') seems to do pretty much what you're looking for; of course, this doesn't let you treat marker styles...

1) There's not such option like series.tooltip.formatter. Only series.tooltip.pointFormat or other formats. For example: tooltip: { pointFormat: "{point.value}" } Example: http://jsfiddle.net/TFhd7/367/ 2) I think this is connected to the design changes between Highcharts 2.x and 4.x. See more in this ticket. And example after setting labels.x to -5: http://jsfiddle.net/TFhd7/368/ Regarding...

I updated my answers to reflect your comments: hold on; BA = B-A; cc=hsv(size(A,1)); for k = 1:size(A,1) scatter3([A(k,1),B(k,1)],[A(k,2),B(k,2)],[A(k,3),B(k,3)],'MarkerFaceColor',cc(k,:), 'MarkerEdgeColor', 'none'); plot3([A(k,1),A(k,1)+BA(k,1)*D(k)],[A(k,2),A(k,2)+BA(k,2)*D(k)],[A(k,3),A(k,3)+BA(k,3)*D(k)],'-', 'Color', cc(k,:)); end hold off; resulting plot: ...

python,matplotlib,plot,jquery-animate,scatter

Scatter returns a collection and you can change the colors of the points in a collection with set_facecolor. Here's an example you can adapt for your code: plt.figure() n = 3 # Plot 3 white points. c = [(1,1,1), (1,1,1), (1,1,1)] p = plt.scatter(np.random.rand(n), np.random.rand(n), c = c, s =...

colors,symbols,symbol,marker,scatter

Luc It seems that you have some errors in your code. The syntax for gscatter should include at least 3 parameters : x, y and group. It seems that group is missing. Furthermore the definition of color and sym may be wrong. Try col = 'kkkkkkkk'; instead of lincol =...

Beyond stackoverflow, the File Exchange is always a good place to start the search for a solution. In this case I found the following submissions: Plot (Big): This simple tool intercepts data going into a plot and reduces it to the smallest possible set that looks identical given the number...

The problem you are seeing is arising because the default mechanism for the FXMLLoader to instantiate a class is to call the no-argument constructor. Your ScatterQuadrantChart has no no-argument constructor, hence the NoSuchMethodError. Prior to Java 8, the only way to fix this was to create a builder class for...

matplotlib,circle,marker,scatter

Instead of using plt.scatter, I suggest using patches.Circle to draw the plot (similar to this answer). These patches remain fixed in size so that you can dynamically zoom in to check for 'connections': import matplotlib.pyplot as plt from matplotlib.patches import Circle # for simplified usage, import this patch # set...

python,colorbar,scatter,basemap

try adding "zorder" so that the points show up above the map: map.fillcontinents(color='lightgray',zorder=0) ...

matlab,plot,filter,points,scatter

Alright, I'm guessing a lot, but we will see. First for the sake of completeness, your data (shortened): data = [... 211.312500 242.803571 5.000000 ... 362.387500 243.662500 7.000000 371.720000 279.490000 7.000000] Then you need to set a threshold, you suggested 1.5 I'd rather go for at least 3. thresh =...