Hi all,
I'm trying to plot in 2D, 3 variables from time series, instead of volume I
want color for the third variable.
I have partial success with a scatter plot, but I'm unable to manage the
colorbar so it represents z values,
I needed to sort the variables and it's getting a bit ugly, so I though I
might be missing some other function ?
this is what I used:
pylab.figure()
x=self.stData[items[0]]
y=self.stData[items[1]]
z=self.stData[items[2]]
points=zip(x,y)
points3=sorted(zip(z,points))
for i,p in enumerate(points3):
z[i]=p[0]
x[i]=p[1][0]
y[i]=p[1][1]
#colors=pylab.linspace(z.min(),z.max(),len(z)) did not work
colors=pylab.linspace(0,1,len(z))
pylab.scatter(x,y,c=colors,faceted=False)
pylab.colorbar()
pylab.show()
but even if I could get the colorbar ticks to represent z values, in fact
this is not correct as this gives every point "one" color, and this is not
correct...
--
View this message in context:
http://www.nabble.com/color-xy-plot-tp18038983p18038983.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users