-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Tony S Yu wrote: > > On Dec 24, 2009, at 4:21 AM, Dominik Szczerba wrote: >> OK I started hacking and added a color_cycle property to matplotlibrc. >> Would you be so kind to add this fix to the official version? Thanks! >> Dominik >> >> $ diff -w axes.py axes.py.org <http://axes.py.org> >> 135,137c135 >> < # DSZ take defaultColors from rcParams >> < # defaultColors = ['b','g','r','c','m','y','k'] >> < defaultColors = rcParams['axes.color_cycle'] >> - --- >>> defaultColors = ['b','g','r','c','m','y','k'] >> >> >> $ diff -w rcsetup.py rcsetup.py.org <http://rcsetup.py.org> >> 442,443d441 >> < # DSZ add color_cycle property >> < 'axes.color_cycle' : [['b','g','r','c','m','y','k'], >> validate_stringlist], >> >> >> >> Add to custom matplotlibrc as e.g.: >> >> axes.color_cycle : w, w, w, w, w, w, w >> > > Hey Dominik, > > I'd also like to see the default color_cycle be customizeable. But, if > I'm not mistaken, this approach doesn't quite do what you want (at least > it doesn't on a recent version of mpl). The problem is that the color > given by lines.color (rcParam) sort of overrides the first color in the > specified color cycle (see > ``_process_plot_var_args._clear_color_cycle`` in axes.py). > > It seems important for lines.color and the first color in the color > cycle to match since this matching is also enforced in > ``axes.set_default_color_cycle``, except in reverse (the first color in > the color cycle overrides line.color). If both lines.color and > axes.color_cycle (or maybe lines.color_cycle) are rcParams, there would > be issues with how to match the two (e.g. which takes precedence if they > differ). > > As I said earlier, I'd like to see this change made, but I think it may > change the current behavior. Maybe a mpl developer could weigh in? > > -Tony
Hi Tony, You are correct, line color overrides the first cycle color. That does not appear a very happy choice to me but this way or another you can still specify BOTH lines.color and the cycle in the param file to get whatever you want, no? Dominik > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAks5v1QACgkQ/EBMh9bUuzL78ACdGfWMvHSI51CaH0VAWkHyL3E2 EfoAn1tdz6JBEFdlIQW78EkoqwW3hP9E =0VzO -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users