<div dir="ltr">I believe that seaborn achieves this through its set_color_codes function:<div><a href="https://github.com/mwaskom/seaborn/blob/10bdb18f47bb5fc0a30d34954ff6f174b4cf5881/seaborn/palettes.py#L900">https://github.com/mwaskom/seaborn/blob/10bdb18f47bb5fc0a30d34954ff6f174b4cf5881/seaborn/palettes.py#L900</a><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 6, 2016 at 7:52 AM, Benjamin Root <span dir="ltr"><<a href="mailto:ben.v.root@gmail.com" target="_blank">ben.v.root@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Pierre,<br><br></div>We are working on a couple different features that would better address your problem. First, we are working on implementing a shorthand notation for properties that would reference elements in the property cycle. So, specifying `color='[0]'` and `linewidth='[0]'` would set those properties from the first element of the property cycle. There are some details that are still being worked out, though, and would likely land in version 2.1, but a preview/beta pared-down version might appear in v2.0.<br><br></div>Another feature that has been discussed, but hasn't gotten very far is a "palette" concept. This would allow one to have multiple versions of that ColorConverter dictionary that would map the names to different rgb specs. I don't think this idea has gotten a pull request yet, and I would imagine that it shouldn't be too difficult to implement for those who might be interested in taking it on.<br><br></div>Cheers!<br></div>Ben Root<br><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Apr 6, 2016 at 8:25 AM, Pierre Haessig <span dir="ltr"><<a href="mailto:pierre.haessig@crans.org" target="_blank">pierre.haessig@crans.org</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
  

    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    <br>
    I've a question about style sheets: <br>
    <blockquote><i>W</i><i>ould it be possible for stylesheets to
        redefine the colorkeywords ('r','g','b'...) to match their color
        design ?</i><br>
    </blockquote>
    I believe this is not currently possible, is that right ?<br>
    <br>
    The only thing that comes close is the modification of the dict
    matplotlib.colors.ColorConverter.colors as discussed here
    (<a href="http://stackoverflow.com/a/19626339/2822346" target="_blank">http://stackoverflow.com/a/19626339/2822346</a>)<br>
    <br>
    The motivation for this would be to have a quick way to reuse colors
    from the default color cycle. Indeed, the new Cycler objects are
    powerful, but a bit heavy weight, especially for quick interactive
    usage. This is pseudo code for the use case I've in mind:<br>
    <blockquote>suplot(211)<br>
      plot(x, y1) # will be blue<br>
      plot(x, y2) # will be green<br>
      <br>
      subplot(212)<br>
      plot(x, y3, 'r') # y3 should stand out. will be red instead of
      blue<br>
    </blockquote>
    <br>
    With the classic style, this approach gives a coherent result, but
    using for example 'seaborn-deep', the default red 'r' is out of
    place. So to make the short color keywords useful again, it would be
    nice if seeborn-deep could redefine 'r' to be the one used in its
    color cycle (a nice dark purple red #8172B2).<br>
    <br>
    for now, seeborn-deep defines the rcParams axes.prop_cycle'<br>
    cycler(u'color', [u'#4C72B0', u'#55A868', u'#C44E52', ...<br>
    <br>
    and with this proposition, it could be instead<br>
     cycler(u'color', [u'b', u'g', u'r'.... like for classic style (at
    least for  the first 3 colors, not sure for the following colors)<br>
    but with extra entries in rcParams to define what b, g, r, ...
    should mean.<br>
    <br>
    <br>
    (Also, I apologize in advance if this kind of proposition has been
    discussed already on the mailing list or on github. I understand
    there was much discussion on the topic of style change and I was not
    much following the discussion these last months.)<br>
    <br>
    <br>
    best,<br>
    Pierre<br>
  </div>

<br></div></div>_______________________________________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@python.org" target="_blank">Matplotlib-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@python.org">Matplotlib-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br>
<br></blockquote></div><br></div>