8000 API: tc prefix -> tab prefix · matplotlib/matplotlib@2810da3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2810da3

Browse files
committed
API: tc prefix -> tab prefix
1 parent 68e5079 commit 2810da3

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

doc/users/colors.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ it can be provided as:
1717
* a name from the `xkcd color survey <https://xkcd.com/color/rgb/>`__
1818
prefixed with ``'xkcd:'`` (e.g., ``'xkcd:sky blue'``)
1919
* one of ``{'C0', 'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9'}``
20-
* one of ``{'tc:blue', 'tc:orange', 'tc:green',
21-
'tc:red', 'tc:purple', 'tc:brown', 'tc:pink',
22-
'tc:gray', 'tc:olive', 'tc:cyan'}`` which are the Tableau Colors from the
20+
* one of ``{'tab:blue', 'tab:orange', 'tab:green',
21+
'tab:red', 'tab:purple', 'tab:brown', 'tab:pink',
22+
'tab:gray', 'tab:olive', 'tab:cyan'}`` which are the Tableau Colors from the
2323
'T10' categorical palette (which is the default color cycle).
2424

2525
All string specifications of color are case-insensitive.

lib/matplotlib/_color_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
('cyan', '#17becf'))
3030
)
3131

32-
# Normalize name to "tc:<name>" to avoid name collisions.
32+
# Normalize name to "tab:<name>" to avoid name collisions.
3333
TABLEAU_COLORS = OrderedDict(
34-
('tc:' + name, value) for name, value in TABLEAU_COLORS.items())
34+
('tab:' + name, value) for name, value in TABLEAU_COLORS.items())
3535

3636
# This mapping of color names -> hex values is taken from
3737
# a survey run by Randel Monroe see:

lib/matplotlib/tests/test_colors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ def angled_plane(azimuth, elevation, angle, x, y):
574574
def test_color_names():
575575
assert mcolors.to_hex("blue") == "#0000ff"
576576
assert mcolors.to_hex("xkcd:blue") == "#0343df"
577-
assert mcolors.to_hex("tc:blue") == "#1f77b4"
577+
assert mcolors.to_hex("tab:blue") == "#1f77b4"
578578

579579

580580
def _sph2cart(theta, phi):

0 commit comments

Comments
 (0)
0