On Tue, Mar 11, 2008 at 12:45:21PM -0700, eliss wrote:
> 
>    Hi, does anyone know of a way to create lines with variable thickness
>    and color when doing a plot?
>    Basically, I'd like to have a third dimension represented using
>    thickness. The API for the plot function states that the line thickness
>    can only be a single floating point number.
>    Thanks

> -------------------------------------------------------------------------
> 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

I don't know if this is the easiest way, but it can be done with clever use of 
fill:

from pylab import *

x = linspace(0,10,101)
y = cos(x)
z = sin(3*x)+2
zn = 0.05*z

xs, ys = mlab.poly_between(x, y-zn, y+zn)
fill(xs, ys)
show()

Best Regards

-- 
Troels Kofoed Jacobsen
[EMAIL PROTECTED]
tel: +45 20880798

-------------------------------------------------------------------------
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