cycling mechanism

Just one quick thought. I hope that you will implement a longer default
color cycle than the current default. I have several times run into
situations where I have to either modify the cycle or specify the colors
manually because I had more than 7 lines. Also, it'd be nice to have
the colors be as distinguishable as possible (at least early in the
cycle). I agree that having linestyle cycling as well would be nice,
though it's difficult to imagine as many distinguishable line styles as
colors, though there could certainly be more than the current 4. I
wonder about a simple mechanism to opt for line style cycling rather
than color cycling so as to produce black & white plots (as mentioned in
another post).

Jon

···

Hello all,

So, I am getting to the point where I need to implement a color
cycling mechanism throughout pyplot. So, before I get too deep in
implementing it, I have some thoughts that I need feedback on.

Thoughts? Comments?

--
______________________________________________________________
Jonathan D. Slavin Harvard-Smithsonian CfA
jslavin@...1081... 60 Garden Street, MS 83
phone: (617) 496-7981 Cambridge, MA 02138-1516
cell: (781) 363-0035 USA
______________________________________________________________

Just one quick thought. I hope that you will implement a longer default

color cycle than the current default. I have several times run into

situations where I have to either modify the cycle or specify the colors

manually because I had more than 7 lines.

Once the framework is in-place, that is certainly possible. I agree that the current list is probably too short and could use 3 or 4 more values.

Also, it’d be nice to have

the colors be as distinguishable as possible (at least early in the

cycle).

Agreed. Having blue and then green has always annoyed me. However, I am hardly a color expert, and I would greatly welcome input from the peanut gallery (possibly from the same people pushing for a change in the default colormap?)

I agree that having linestyle cycling as well would be nice,

though it’s difficult to imagine as many distinguishable line styles as

colors, though there could certainly be more than the current 4.

A new feature added in v1.1.0 was the ability to specify custom line styles, and a quick look through the line styles available in LibreOffice could be an inspiration for some more standard styles.

I wonder about a simple mechanism to opt for line style cycling rather

than color cycling so as to produce black & white plots (as mentioned in

another post).

The idea is that since these are all configurable through the rcparam mechanism, standard profiles can be created with various combinations of settings and all a user (or a convenience function) has to do is “matplotlibrc.update(mystyle_profile)”. Note, this wouldn’t be a “live” switch of styles. In other words, once an element has been plotted, changing the profile will not update those plot elements.

Ben Root

···

On Thu, Jan 5, 2012 at 7:56 AM, Jonathan Slavin <jslavin@…1081…> wrote:

I guess this is sort of a tangential discussion, but, since you mentioned it, I’ve attached a script showing my vote for a 11-color cycle. Also, I’ve attached a script which shows all named colors defined by mpl.

-Tony

example_color_cycle.py (547 Bytes)

show_named_colors.py (1.39 KB)

···

On Thu, Jan 5, 2012 at 11:51 AM, Benjamin Root <ben.root@…1304…> wrote:

On Thu, Jan 5, 2012 at 7:56 AM, Jonathan Slavin <jslavin@…1081…> wrote:

Just one quick thought. I hope that you will implement a longer default

color cycle than the current default. I have several times run into

situations where I have to either modify the cycle or specify the colors

manually because I had more than 7 lines.

Once the framework is in-place, that is certainly possible. I agree that the current list is probably too short and could use 3 or 4 more values.

Also, it’d be nice to have

the colors be as distinguishable as possible (at least early in the

cycle).

Agreed. Having blue and then green has always annoyed me. However, I am hardly a color expert, and I would greatly welcome input from the peanut gallery (possibly from the same people pushing for a change in the default colormap?)