John Hunter wrote:
> On Mon, May 19, 2008 at 8:38 AM, Zoho Vignochi <[EMAIL PROTECTED]> wrote:
>> Hello:
>>
>> I want to plot a variable number of lines but I would like the colors to
>> cycle through a set pattern defined by me.
>> ...snip
>> and it works great. But I need legends for each line so I can't use
>> collections. I would like to choose the colors and loop over a list if
>> the lines exceed the colors while using plot. Any ideas?
> 
> You can override the default color cycle:
> 
> import matplotlib.axes
> 
> matplotlib.axes._process_plot_var_args.defaultColors =
> [k','y','m','c','b','g','r']
> 
> We should remove the leading underscore in the _process_plot_var_args
> since it indicates users should not be working with it, but
> customizing the color cycle is perfectly legit.

True, but from the standpoint of user interface design this may not be a 
good way to do it.  At the very least, shouldn't there be a more concise 
variable or function?  _process_plot_var_args really deserves its 
leading underscore.  We could use something like an axes-level function, 
"set_color_cycle(clist)" to encapsulate what you suggest above.

Eric

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