On Sun, Apr 11, 2010 at 12:40 PM, Peter Butterworth <[email protected]> wrote:
> sorry if this has been covered before, but I must say I've found the
> following quite confusing :
> color="cyan" is not in fact equivalent to color='c'
>
>
> in colors.py :
>
> 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
>
> in ColorConverter :
> colors = {
> 'b' : (0.0, 0.0, 1.0),
> 'g' : (0.0, 0.5, 0.0),
> 'r' : (1.0, 0.0, 0.0),
> 'c' : (0.0, 0.75, 0.75),
> 'm' : (0.75, 0, 0.75),
> 'y' : (0.75, 0.75, 0),
> 'k' : (0.0, 0.0, 0.0),
> 'w' : (1.0, 1.0, 1.0),
> }
>
> we are told 'c' is short for cyan. Yet color="cyan" is not equivalent
> to color='c'
> 'cyan' : '#00FFFF'
>
> In [50]: rgb2hex((0.0, 0.75, 0.75))
> Out[50]: '#00bfbf'
>
Thank you for reporting.
It seems that it is not just "c", but the rgb values of "m" and "y"
are also different.
In [26]: cc.to_rgb("magenta")
Out[26]: (1.0, 0.0, 1.0)
In [27]: cc.to_rgb("m")
Out[27]: (0.75, 0, 0.75)
In [30]: cc.to_rgb("yellow")
Out[30]: (1.0, 1.0, 0.0)
In [31]: cc.to_rgb("y")
Out[31]: (0.75, 0.75, 0)
John, the relevant code to define the "colors" attribute seems to be
written by you. Maybe this is some matlab convention? Can you comment
on this?
Regards,
-JJ
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users