Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 to be confused with "State") by the actual color of the dot. Incidentally, there are 5 States, and 5 Statuses.

I found a couple of promising ones in a quick Google search, but didn't see the ability to specify the color of the dot (I found one that let me change the size, however). Any suggestions anyone has would be greatly appreciated.

Below is kind of what I'm going for, but I think the dots would be arranged more cleanly in 5 distinct columns (based on the 5 States). But it might help with visualization.

alt text

Thanks.

like image 688
MegaMatt Avatar asked Feb 15 '10 20:02

MegaMatt


People also ask

Which function call will create the scatter plot?

scatter() and plt. plot() You can also produce the scatter plot shown above using another function within matplotlib. pyplot .

How do you draw a scatter graph?

Draw a graph with the independent variable on the horizontal axis and the dependent variable on the vertical axis. For each pair of data, put a dot or a symbol where the x-axis value intersects the y-axis value. (If two dots fall together, put them side by side, touching, so that you can see both.)

When would you use a scatter plot?

Use a scatter plot when you have two variables that pair well together. If you have two variables that pair well together, plotting them on a scatter diagram is a great way to view their relationship and see if it's a positive or negative correlation.


2 Answers

FLOT is a really nice charting plugin. It doesn't specifically support scatter charts (to my knowledge) but it does support point charts. Check out the usage page for some examples on how it has been used to create scatters.

like image 118
Abram Simon Avatar answered Oct 20 '22 02:10

Abram Simon


Personally I love this:

http://omnipotent.net/jquery.sparkline/

See if this is enough for You. It won't get easier and more comfortable.

[and it has lots of samples on main page :)]

like image 31
naugtur Avatar answered Oct 20 '22 02:10

naugtur