variable line thickness in a plot

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



On Tue, Mar 11, 2008 at 01:23:55PM -0700, eliss wrote:

On 3/11/08, Steve Schmerler <elcorto@...361...> 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?