Re: [Matplotlib-users] Line changes color along its length

2010-09-08 Thread Jonathan Slavin
This is of interest to me, and it's nice to know that this is do-able with matplotlib, but like many of the examples, I find it sorely lacking in documentation. For example, why are the points and segments arrays shaped so specifically the way they are? Why the call to set_array? Could the same

Re: [Matplotlib-users] Line changes color along its length

2010-09-08 Thread Brian Larsen
Perfect thank you, no wonder I didnt find it, plt.gca().add_collection(lc) never found its way to my radar. Cheers, Brian On Sep 7, 2010, at 7:58 PM, Ryan May wrote: On Tue, Sep 7, 2010 at 6:50 PM, Brian Larsen balar...@lanl.gov wrote: Hey all, I think I know the answer here as no or

[Matplotlib-users] Line changes color along its length

2010-09-07 Thread Brian Larsen
Hey all, I think I know the answer here as no or something, but say I have a curve I want to plot and I want the color to change along the curve to denote the 3rd variable is there anyway to do this is matplotlib? What I mean is take the simple plot from pylab import * plot(range(30),

Re: [Matplotlib-users] Line changes color along its length

2010-09-07 Thread Ryan May
On Tue, Sep 7, 2010 at 6:50 PM, Brian Larsen balar...@lanl.gov wrote: Hey all, I think I know the answer here as no or something,  but say I have a curve I want to plot and I want the color to change along the curve to denote the 3rd variable is there anyway to do this is matplotlib? What I