On Tue, Mar 11, 2008 at 01:23:55PM -0700, eliss wrote:
> On 3/11/08, Steve Schmerler <[EMAIL PROTECTED]> wrote:
> >
> > On Tue, Mar 11, 2008 at 12:45:21PM -0700, eliss wrote:
> > > The API for the plot function states that the line thickness can only be
> > a
> > > single floating point number.
> > >
> >
> > Really? Try
> >
> >    plot([1,2,3], lw=math.pi)
> >
> > cheers,
> > steve
> 
> 
> Sorry, I don't get your point. math.pi is just a single floating point
> number. How can I use that to create lines with variable thickness?

Ah sorry for the noise, I didn't read your message well. I somehow thought you
ment an *integer* rather than a float. 

So, I'm not sure whether you want a single line that changes width and color or 
several lines that change. In the latter case you could of course just loop over
your properties. Something like
    
    x = linspace(0,3,50)
    for w in [0,1,2,3,4,5]: 
        plot(x, sin(x*w), lw=w, color=(w/5.0,0,(5-w)/5.0));

If you don't want that, then the example from Troels Kofoed Jacobsen will be
a nice way to go. Didn't know about mlab.poly_between. Didn't find it in the 
CHANGELOG.

cheers,
steve

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to