scatter-plot

Different scatterplot markers with the same label

孤街浪徒 提交于 2019-12-12 13:00:08
问题 I am having 'similar' issues to Matplotlib, legend with multiple different markers with one label. I was able to achieve the following thanks to this question Combine two Pyplot patches for legend. fig = pylab.figure() figlegend = pylab.figure(figsize=(3,2)) ax = fig.add_subplot(111) point1 = ax.scatter(range(3), range(1,4), 250, marker=ur'$\u2640$', label = 'S', edgecolor = 'green') point2 = ax.scatter(range(3), range(2,5), 250, marker=ur'$\u2640$', label = 'I', edgecolor = 'red') point3 =

Removing a dot in a scatter plot with matplotlib

南笙酒味 提交于 2019-12-12 12:29:38
问题 The below code creates a scatter plot with a white dot. How can I remove this dot without redrawing the whole figure? g = Figure(figsize=(5,4), dpi=60); b = g.add_subplot(111) b.plot(x,y,'bo') # creates a blue dot b.plot(x,y,'wo') # ovverrides the blue dot with a white dot (but the black circle around it remains) 回答1: Overplotting is not the same as removing. With your second plot call you draw a white marker, with a black border. You can set the edgecolor for a marker with plot(x,y,'wo', mec

Good Scatter-plot plugin for JQuery (sample pic included)?

不羁岁月 提交于 2019-12-12 08:07:37
问题 I'm looking for a solid graphing plugin for JQuery that can give me an attractive scatterplot for use on my site. I really don't need a lot of fancy functionality -- just the ability to plot points on a graph based on the X-axis and Y-axis values I give it. The only somewhat peculiar requirement I have is that the dots have the ability to be different colors. In addition to tracking the item's "State" on the X-Axis, and it's "Input Time" on the Y-Axix, I want to represent it's "Status" (not

matplotlib: clearing the scatter data before redrawing

ⅰ亾dé卋堺 提交于 2019-12-12 07:23:04
问题 I have a scatter plot, over an imshow (map). I want a click event to add a new scatter point, which I have done by scater(newx,newy)). The trouble is, I then want to add the ability to remove points using a pick event. As there is no remove(pickX,PickY) function, I must get the picked Index and remove them from the list, which means I can't create my scatter as above, I must scatter(allx, ally). So the bottom line is I need a method of removing the scatter plot and redrawing it with new data,

Matplotlib Scatter plot change color based on value on list

本秂侑毒 提交于 2019-12-12 07:07:13
问题 I'm quite new to matplotlib and i would like to know how we can change color of points on a scatter plot based on the value in a list. In fact, I have a 2-D array that I want to plot and a list with the same number of rows containing, for each point, the color we want to use. #Example data = np.array([4.29488806,-5.34487081], [3.63116248,-2.48616998], [-0.56023222,-5.89586997], [-0.51538502,-2.62569576], [-4.08561754,-4.2870525 ], [-0.80869722,10.12529582]) colors = ['red','red','red','blue',

R scatterplot matrix with error bars

两盒软妹~` 提交于 2019-12-12 05:53:10
问题 Is there any R package/method/function that provides the functionality to plot a matrix of scatterplots as here ( scatterplot.matrix function of the car package, found here) AND to plot x and y errorbars as has been asked and answered here. An example: set.seed(123) df <- data.frame(X = rnorm(10), errX = rnorm(10)*0.1, Y = rnorm(10), errY = rnorm(10)*0.2, Z = rnorm(10)) require(ggplot2) ggplot(data = df, aes(x = X, y = Y)) + geom_point() + geom_errorbar(aes(ymin = Y-errY, ymax = Y+errY)) +

D3.js Scatterplot with Lasso - record selections

徘徊边缘 提交于 2019-12-12 04:12:21
问题 CONTEXT I'm using d3.js & Lasso in order to allow users to select dots on a scatterplot. I want them to be able to select multiple clusters on the same scatterplot, one after the other. I've found an example of how to do this right here: http://bl.ocks.org/skokenes/511c5b658c405ad68941 PROBLEM I want to record each selection of dots so that I end up with an array, where each dot has a list of clusters it belongs to. For example, Dot1 belongs to clusters [1,3,4]. QUESTION What would be the

Show line chart and scatter chart in one VizFrame

五迷三道 提交于 2019-12-12 04:08:10
问题 I have VizFrame scatter chart and I need to add there some data represented by line. I was trying to do this by adding reference line (plotArea.referenceLine.line), but it looks like the input can be just one value for this property, so the reference line is always perpendicluar one the axis (please see example). The data I would like to add as a line are saved under the "Line" name: var oData = [ { "Z": "A", "X": 171.9, "Y": 183, "Line": 176.7 }, { "Z": "B", "X" : 144.3, "Y": 158.6, "Line":

How to make scatterplot highlight data on-click

我是研究僧i 提交于 2019-12-12 03:09:52
问题 Dear fellow programmers, I'm trying to make 2 interactive visualisations. The first one is a worldmap on which the user can click. With every click i want the second visualisation, the scatterplot, to highlight the specific circle/dot which displays the data of the country that was clicked on. Could you please help me? So far i made sure that when a country is clicked, the country code is returned. The code of the worldmap: new Datamap({ scope: 'world', done: function(datamap) { datamap.svg

Colouring scatter graph by type in r

拟墨画扇 提交于 2019-12-12 02:49:25
问题 Is there a way you can create a scatter graph in R and colour the points by a category? For example, I have a dataset with a list of x and y points (both columns 'Xpoints' and 'Ypoints' have scales from 0 to 100), but each combined x&y point belongs to one of five categories (in a third column 'Category'). I would like to plot all the combined x&y points AND colour each point by its respective category. I'm guessing that the five categories would have to allocated numbers 1 to 5 in an