On 2/12/07, Martin Spacek <[EMAIL PROTECTED]> wrote:
> Looking through colors.py, I noticed that most of the grey cnames use
> the spelling 'gray' (the US standard I think), although 'lightgrey'
> shows up as a valid name, while 'lightgray' does not. After looking
> around the web a bit for what the correct html names are, I found most
> sites display 'gray' and 'grey' as synonymous, for all the different
> intensities (darkslate, light, dim, etc).
>
> So, here's a patch that does the same, allowing ColorConverter to accept
> both spellings for all the intensities.
>


Thanks for the suggestion -- I did this automagically with

# add british equivs
for k, v in cnames.items():
    if k.find('gray')>=0:
        k = k.replace('gray', 'grey')
        cnames[k] = v

Note that in pylab, you can get some extra information by doing

>>> help(colors)
colors()
    This is a do nothing function to provide you with help on how
    matplotlib handles colors.

    Commands which take color arguments can use several formats to
    specify the colors.  For the basic builtin colors, you can use a
    single letter

      b  : blue
      g  : green
      r  : red
      c  : cyan
      m  : magenta
      y  : yellow
      k  : black
      w  : white


    For a greater range of colors, you have two options.  You can
    specify the color using an html hex string, as in

      color = '#eeefff'

    or you can pass an R,G,B tuple, where each of R,G,B are in the
    range [0,1].

    You can also use any legal html name for a color, like 'red',
    'burlywood' and 'chartreuse'

    The example below creates a subplot with a dark
    slate gray background

       subplot(111, axisbg=(0.1843, 0.3098, 0.3098))

    Here is an example that creates a pale turqoise title

      title('Is this the best color?', color='#afeeee')

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to