Skip to content

Commit ac2fc0e

Browse files
authored
Merge pull request #30814 from timhoffm/doc-discouraged-colormaps
DOC: Discouraged duplicate colormaps
2 parents 89aa371 + 5ff6b1c commit ac2fc0e

File tree

2 files changed

+36
-6
lines changed

2 files changed

+36
-6
lines changed

galleries/examples/color/colormap_reference.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@
2424
'YlOrBr', 'YlOrRd', 'OrRd', 'PuRd', 'RdPu', 'BuPu',
2525
'GnBu', 'PuBu', 'YlGnBu', 'PuBuGn', 'BuGn', 'YlGn']),
2626
('Sequential (2)', [
27-
'binary', 'gist_yarg', 'gist_gray', 'gray', 'bone', 'pink',
28-
'spring', 'summer', 'autumn', 'winter', 'cool', 'Wistia',
29-
'hot', 'afmhot', 'gist_heat', 'copper']),
27+
'gray', 'bone', 'pink', 'spring', 'summer', 'autumn', 'winter',
28+
'cool', 'Wistia', 'hot', 'afmhot', 'gist_heat', 'copper']),
3029
('Diverging', [
3130
'PiYG', 'PRGn', 'BrBG', 'PuOr', 'RdGy', 'RdBu',
3231
'RdYlBu', 'RdYlGn', 'Spectral', 'coolwarm', 'bwr', 'seismic',
@@ -70,6 +69,22 @@ def plot_color_gradients(cmap_category, cmap_list):
7069

7170

7271
# %%
72+
#
73+
# .. admonition:: Discouraged
74+
#
75+
# For backward compatibility we additionally support the following colormap
76+
# names, which are identical to other builtin colormaps. Their use is
77+
# discouraged. Use the suggested replacement instead.
78+
#
79+
# ========= =================================
80+
# Colormap Use identical replacement instead
81+
# ========= =================================
82+
# gist_gray gray
83+
# gist_yarg gray_r
84+
# binary gray_r
85+
# ========= =================================
86+
#
87+
#
7388
# .. _reverse-cmap:
7489
#
7590
# Reversed colormaps

galleries/users_explain/colors/colormaps.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,26 @@ def plot_color_gradients(category, cmap_list):
161161
# an excellent example of this).
162162

163163
plot_color_gradients('Sequential (2)',
164-
['binary', 'gist_yarg', 'gist_gray', 'gray', 'bone',
165-
'pink', 'spring', 'summer', 'autumn', 'winter', 'cool',
166-
'Wistia', 'hot', 'afmhot', 'gist_heat', 'copper'])
164+
['gray', 'bone', 'pink', 'spring', 'summer', 'autumn',
165+
'winter', 'cool', 'Wistia', 'hot', 'afmhot', 'gist_heat',
166+
'copper'])
167167

168168
# %%
169+
# .. admonition:: Discouraged
170+
#
171+
# For backward compatibility we additionally support the following colormap
172+
# names, which are identical to other builtin colormaps. Their use is
173+
# discouraged. Use the suggested replacement instead.
174+
#
175+
# ========= =================================
176+
# Colormap Use identical replacement instead
177+
# ========= =================================
178+
# gist_gray gray
179+
# gist_yarg gray_r
180+
# binary gray_r
181+
# ========= =================================
182+
#
183+
#
169184
# Diverging
170185
# ---------
171186
#

0 commit comments

Comments
 (0)