@@ -9,11 +9,11 @@ it can be provided as:
9
9
10
10
* a ``(r, g, b) `` tuple
11
11
* a ``(r, g, b, a) `` tuple
12
- * a hex string RGB or RGBA string (ex ``'#0F0F0F' `` or ``'#0F0F0F0F' ``)
12
+ * a hex string RGB or RGBA (ex ``'#0F0F0F' `` or ``'#0F0F0F0F' ``)
13
13
* a float value in ``[0, 1] `` inclusive for gray level
14
14
* one of ``{'b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'} ``
15
15
* a X11/CSS4 color name
16
- * a name from the `xkcd color survey <http ://xkcd.com/color/rgb/ >`__
16
+ * a name from the `xkcd color survey <https ://xkcd.com/color/rgb/ >`__
17
17
prefixed with ``'xkcd:' `` (e.g., ``'xkcd:sky blue' ``)
18
18
* one of ``{'C0', 'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9'} ``
19
19
@@ -28,12 +28,16 @@ This can be passed any place that a color is currently accepted and
28
28
can be used as a 'single character color' in format-string to
29
29
`matplotlib.Axes.plot `.
30
30
31
- This allows easy access to the color is the propriety cycle and to write code
32
- that will integrate with global changes to the style. For example
31
+ The single digit is the index into the default property cycle
32
+ (``matplotlib.rcParams['axes.prop_cycle'] `` to get the color from. If
33
+ the property cycle includes ``'color `` then black is returned. The
34
+ color is evaluated when the artits is created. For example
33
35
34
36
.. plot ::
35
37
:include-source: True
36
38
39
+ import numpy as np
40
+ import matplotlib.pyplot as plt
37
41
import matplotlib as mpl
38
42
th = np.linspace(0, 2*np.pi, 128)
39
43
@@ -50,15 +54,16 @@ that will integrate with global changes to the style. For example
50
54
demo('default')
51
55
demo('seaborn')
52
56
53
- will plot using the color of the first and sixth styles in
54
- ``mpl.rcParams['axes.prop_cycle'] ``.
57
+ will use the first color for the title and then plot using the second
58
+ and third colors of the styles ``mpl.rcParams['axes.prop_cycle'] ``.
59
+
55
60
56
61
xkcd v X11/CSS4
57
62
---------------
58
63
59
64
The xkcd colors are derived from a user survey conducted by the
60
65
webcomic xkcd. `Details of the survey are available on the xkcd blog
61
- <http ://blog.xkcd.com/2010/05/03/color-survey-results/> `__.
66
+ <https ://blog.xkcd.com/2010/05/03/color-survey-results/> `__.
62
67
63
68
There are 95 (out of 148 colors in the css color list) name collisions
64
69
between the X11/CSS4 names and the xkcd names, all but 3 of which have
0 commit comments