Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1b69511

Browse files
committed
Alpha & color examples and static images
1 parent 2d932b8 commit 1b69511

3 files changed

Lines changed: 17 additions & 8 deletions

File tree

doc/_static/color_zorder_A.png

4.4 KB
Loading

doc/_static/color_zorder_B.png

3.89 KB
Loading

tutorials/colors/colors.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@
1010
+======================================+======================================+
1111
| RGB or RGBA (red, green, blue, alpha)| - ``(0.1, 0.2, 0.5)`` |
1212
| tuple of float values in a closed | - ``(0.1, 0.2, 0.5, 0.3)`` |
13-
| interval [0, 1] | |
13+
| interval [0, 1]. | |
1414
+--------------------------------------+--------------------------------------+
1515
| Case-insensitive hex RGB or RGBA | - ``'#0f0f0f'`` |
16-
| string | - ``'#0f0f0f80'`` |
16+
| string. | - ``'#0f0f0f80'`` |
1717
+--------------------------------------+--------------------------------------+
1818
| Case-insensitive shorthand equivalent| - ``'#abc'`` as ``'#aabbcc'`` |
1919
| string of RGB or RGBA from duplicated| - ``'#abcd'`` as ``'#aabbccdd'`` |
20-
| characters | |
20+
| characters. | |
2121
+--------------------------------------+--------------------------------------+
2222
| String representation of float value | - ``'0.8'`` as light gray |
2323
| in closed interval ``[0, 1]`` for | - ``'0'`` as black |
2424
| black and white, respectively. | - ``'1'`` as white |
2525
+--------------------------------------+--------------------------------------+
2626
| Single character shorthand notation | - ``'b'`` as blue |
27-
| for shades of colors | - ``'g'`` as green |
27+
| for shades of colors. | - ``'g'`` as green |
2828
| | - ``'r'`` as red |
2929
| .. note:: The colors green, cyan, | - ``'c'`` as cyan |
3030
| magenta, and yellow do not | - ``'m'`` as magenta |
@@ -34,10 +34,10 @@
3434
+--------------------------------------+--------------------------------------+
3535
| Case-insensitive color name from | - ``'xkcd:sky blue'`` |
3636
| `xkcd color survey`_ with ``'xkcd:'``| - ``'xkcd:eggshell'`` |
37-
| prefix | |
37+
| prefix. | |
3838
+--------------------------------------+--------------------------------------+
3939
| Case-insensitive Tableau Colors from | - 'tab:blue' |
40-
| 'T10' categorical palette | - 'tab:orange' |
40+
| 'T10' categorical palette. | - 'tab:orange' |
4141
| | - 'tab:green' |
4242
| | - 'tab:red' |
4343
| | - 'tab:purple' |
@@ -49,7 +49,7 @@
4949
+--------------------------------------+--------------------------------------+
5050
| "CN" color spec where ``'C'`` | - ``'C0'`` |
5151
| precedes a number acting as an index | - ``'C1'`` |
52-
| into the default property cycle +--------------------------------------+
52+
| into the default property cycle. +--------------------------------------+
5353
| | :rc:`axes.prop_cycle` |
5454
| .. note:: Indexing occurs at | |
5555
| rendering time and defaults| |
@@ -75,7 +75,16 @@
7575
7676
Alpha of 1 indicates the new Artist completely covers the previous color.
7777
Alpha of 0 for top color is not visible; however, it contributes to blending
78-
for intermediate values as the cumulative result of all previous Artists.
78+
for intermediate values as the cumulative result of all previous Artists. The
79+
following table contains examples.
80+
81+
+---------------+-------------------------------------------------------------+
82+
| Alpha value | Visual |
83+
+===============+=============================================================+
84+
| ``0.3`` | .. image:: ../../_static/color_zorder_A.png |
85+
+---------------+-------------------------------------------------------------+
86+
| ``1`` | .. image:: ../../_static/color_zorder_B.png |
87+
+---------------+-------------------------------------------------------------+
7988
8089
.. note::
8190

0 commit comments

Comments
 (0)