Re: [Matplotlib-users] automatically choose different line markers

2010-11-08 Thread Aman Thakral
Honestly, I can't even remember why it is wrapped. I think this is just a relic of some old example that I had lying around. Serves me right for just copying and pasting without thinking :P . A straight call to itertools.cycle is definitely much cleaner. Also, is there an example of this in the

Re: [Matplotlib-users] automatically choose different line markers

2010-11-08 Thread Ryan May
On Fri, Nov 5, 2010 at 8:07 AM, Aman Thakral wrote: > Hi, > > The best way to do this is to use a generator: > > import itertools > import matplotlib.pyplot as plt > import numpy as np > > def _ncycle(iterable,n): >     """ >     Method to create a generator from an iterable.  It keeps the >     c

Re: [Matplotlib-users] automatically choose different line markers

2010-11-08 Thread Nicolas Bigaouette
> > How can I automatically cycle through distinctive line markers? >> >> I want a semilog plot, composed of a number of lines. Each line should >> have >> a different color and marker. > > I simply use: colors = ['b', 'r', 'c', 'm', 'k', 'g', 'y'] symbols = ['-', '--', '-.', ':'] nc = len(colors

Re: [Matplotlib-users] automatically choose different line markers

2010-11-05 Thread Aman Thakral
Hi, The best way to do this is to use a generator: import itertools import matplotlib.pyplot as plt import numpy as np def _ncycle(iterable,n): """ Method to create a generator from an iterable. It keeps the current position of the iterable in memory. Each time the next() metho

[Matplotlib-users] automatically choose different line markers

2010-11-05 Thread Neal Becker
How can I automatically cycle through distinctive line markers? I want a semilog plot, composed of a number of lines. Each line should have a different color and marker. Cycling through the colors is automatic, but not the markers. BTW, shouldn't this behavior be the default? I would just lik