November 21st, 2012, 09:11 AM

How to plot a graph with these data
hi. i'd like to understand how to make the following graph in python, using matplotlib.
i have values for pressure, and it varies with yaxis. so, for example i have:
x=1,y=1,p=3
x=1,y=2,p=5
x=1,y=3,p=0
and so on, other sets for other x, eg:
x=2,y=1,p=9
x=2,y=2,p=5 ...
x=3,y=1,p=3
x=3,y=2,p=7 ...
So, what i need to do, is to put pressure values in a xy graph. How i can do this? I was thinking of dot with different diameters or stuffs like that, but i don't now how to do.
thanks
November 21st, 2012, 11:36 AM

You can use different diameters:
Code:
matplotlib.pyplot.scatter(x, y, s)
s is an array of sizes in units of points^2 (i.e., proportional to area). The diameter would be proportional to sqrt(s).
You can also choose the color of each point.
Code:
help(matplotlib.pyplot.scatter)
will give you the details.