On Tue, 19 Feb 2008, Neal Becker apparently wrote:

> IIUC, in order to have each line with distinct line style, I have to 
> explicitly set the line style.  I want pylab to just choose them, just as 
> it does for colors. 

Well, pylab does choose: it varies color and not the dash 
pattern in order to have distinct lines.

I think what you are wanting is something like the 
following: have pylab/pyplot cycle automatically through 
a set of preset Line2D property combinations, when an axes
plots multiple lines.

I think the answer is: this is not available in the
form you want.  (Indeed, it is hard for me to imagine
agreement on "nice" choices for multiple properties.)

Of course you can do something like this::

    from itertools import cycle

    mystyles = ['r+-', 'b.--', 'go-.'] #etc
    ax1styles = cycle( mystyles )

    for x,y in data:
        ax1.plot(x, y, ax1styles.next())

Cheers,
Alan Isaac





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