On 3/11/08, Troels Kofoed Jacobsen <[EMAIL PROTECTED]> wrote:
>
> 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
>
> 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


Thanks for the reply. I couldn't find the "poly_between" function in mlab. I
imported my mlab, and did dir(mlab) but that method doesn't show up in
there. I tried redownloading the latest version of matplotlib as well. Am I
missing a library?
-------------------------------------------------------------------------
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