I'm happy to post this example in the examples dir, where it will
automatically get picked up in the website gallery and examples dir.
That'd be great!
The scipy cookbook is fine too, but I would prefer that a little mini
tutorial be written in rest explaining the example and we can start a
cookbook in the mpl docs. If you would like to go this route, we can
add a section to the users guide for "explained examples", aka a
Now that I think about it, maybe this example isn't suited for a cookbook. Or maybe I'm just being lazy and avoiding the work involved in writing an explanation.
I am curious though why you prefer to alter the default color cycle
rather than just passing the color in to the plot command -- it seems
more explicit to pass the color in directly rather than rely on the
Actually, I originally cycled through colors in my plot loop, which I agree is more explicit. However, I got tired of the extra code involved with this method and went looking for a way to change the defaults. Plus, I already have of a module of functions I use to change matplotlib defaults (different fontsizes, linewidths, etc. for publications, presentations, etc), and this function fit quite nicely with that module.
PS. If it'd be useful to show different ways of cycling through colors, here's another version of my example:
color_gradient_cycle.py (3.91 KB)
On Jun 6, 2009, at 9:34 AM, John Hunter wrote: