From: Fernando P. <fpe...@gm...> - 2007-02-23 09:29:52
|
On 2/23/07, Fernando Perez <fpe...@gm...> wrote: > On 2/23/07, Jouni K. Sepp=E4nen <jk...@ik...> wrote: > > Brian Blais <bb...@br...> writes: > > > > > Is there a way to specify the default order of line colors and > > > styles, for plot commands given in sequence > > > > I don't think there is built-in support for this. See e.g. > > http://thread.gmane.org/gmane.comp.python.matplotlib.general/5708 > > for some previous discussion and suggestions. > > It's probably worth mentioning that the cyclers John mentions are > trivial to write using itertools: Sorry, tab put me in the 'send' button in gmail too early... I meant: import itertools colorcycler =3D itertools.cycle(['blue','green','red','magenta','cyan']).ne= xt linecycler =3D itertools.cycle([ '-','--', '-.' , ':' ]).next n =3D itertools.count().next y =3D array([1,2,3]) for i in range(10): plot(y+n(),color=3Dcolorcycler(),linestyle=3Dlinecycler()) Cheers, f |