On 03/30/2011 01:32 PM, Nat Echols wrote:
> I wanted to display a line plot with rainbow coloring based on the
> y-value, similar to what's possible for surface plots.  However, the
> 'plot' method does not appear to accept a 'cmap' argument.  The closest
> thing I was able to find was a recipe for different colored line
> segments on the SciPy examples page
> (http://www.scipy.org/Cookbook/Matplotlib/MulticoloredLine), but that's
> not really what I want - I was hoping for a continuous gradient over
> hundreds (possibly thousands) of points on a line.  Is this possible
> without too much hacking?

I don't think there is anything better than the second example here:
http://matplotlib.sourceforge.net/examples/pylab_examples/multicolored_line.html

Eric

>
> thanks,
> Nat

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to