On Tue, Apr 14, 2009 at 8:56 AM, Ryan May <rma...@gmail.com> wrote:

> Also, you can use itertools.cycle to loop over a set of markers probably a
> bit more cleanly than the example:
>
> markers = itertools.cycle(lines.Line2D.markers.keys())
> marker = markers.next()


Yes, that is better that the somewhat opaque i%N trick.  And the call
to "keys()" is unnecessary because the iterator will cycle over the
keys of the dict anyhow, but I think it makes it a little clearer what
kind of data structure you are working with.

JDH

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to