[Matplotlib-users] easily accessing the default color cycle list
Thomas Caswell
tcaswell at gmail.com
Tue Jan 10 13:18:10 EST 2017
It is also documented at http://matplotlib.org/2.0.0rc2/users/colors.html which
is too verbose to put into the docstring of every method (almost all of
them) that takes in a color-like input.
Additionally, we will be adding alias to access the color by name for 2.0
final (see https://github.com/matplotlib/matplotlib/pull/7639 )
Tom
On Tue, Jan 10, 2017 at 1:14 PM Michael Kaufman <kaufmanmc at ornl.gov> wrote:
> Sure, but since I'm using a version of mpl that supports 'CN' color
> designations, it ought to at least be in documentation that's accessible
> via help().
>
> M
>
> On 1/10/17 1:10 PM, Benjamin Root wrote:
> > This feature will be in the upcoming 2.0 release. It isn't in the 1.5.x
> > series.
> >
> > On Tue, Jan 10, 2017 at 1:01 PM, Ilya Flyamer <flyamer at gmail.com
> > <mailto:flyamer at gmail.com>> wrote:
> >
> > Hi Michael,
> >
> > I think the new colours can be used as 'C0', 'C1', etc, if that
> helps?
> >
> > Ilya
> >
> > 2017-01-10 17:57 GMT+00:00 Michael Kaufman <kaufmanmc at ornl.gov
> > <mailto:kaufmanmc at ornl.gov>>:
> >
> > Hi All,
> >
> > With the new color cycle, it's no longer super easy for me to
> > manually set plotting colors (that still conform to the new
> > default colors) without a cheat sheet.
> >
> > Recently I've been doing:
> >
> > cols = rcParams['axes.prop_cycle'].by_key()['color']
> >
> > to get the list. This is something that I cannot remember and
> > have search through old code to find every time.
> >
> > Is there an easier way to access this list? Something like:
> >
> > from matplotlib.colors import color_cycle
> > cols = color_cycle('default')
> >
> > would be quite nice. Maybe something like this already exists?
> >
> >
> > M
> > _______________________________________________
> > Matplotlib-users mailing list
> > Matplotlib-users at python.org <mailto:Matplotlib-users at python.org>
> > https://mail.python.org/mailman/listinfo/matplotlib-users
> > <https://mail.python.org/mailman/listinfo/matplotlib-users>
> >
> >
> >
> > _______________________________________________
> > Matplotlib-users mailing list
> > Matplotlib-users at python.org <mailto:Matplotlib-users at python.org>
> > https://mail.python.org/mailman/listinfo/matplotlib-users
> > <https://mail.python.org/mailman/listinfo/matplotlib-users>
> >
> >
>
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20170110/82189614/attachment.html>
More information about the Matplotlib-users
mailing list