FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

DOC: Discouraged duplicate colormaps by timhoffm · Pull Request #30814 · matplotlib/matplotlib · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (2) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
21 changes: 18 additions & 3 deletions galleries/examples/color/colormap_reference.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
'YlOrBr', 'YlOrRd', 'OrRd', 'PuRd', 'RdPu', 'BuPu',
'GnBu', 'PuBu', 'YlGnBu', 'PuBuGn', 'BuGn', 'YlGn']),
('Sequential (2)', [
'binary', 'gist_yarg', 'gist_gray', 'gray', 'bone', 'pink',
'spring', 'summer', 'autumn', 'winter', 'cool', 'Wistia',
'hot', 'afmhot', 'gist_heat', 'copper']),
'gray', 'bone', 'pink', 'spring', 'summer', 'autumn', 'winter',
'cool', 'Wistia', 'hot', 'afmhot', 'gist_heat', 'copper']),
('Diverging', [
'PiYG', 'PRGn', 'BrBG', 'PuOr', 'RdGy', 'RdBu',
'RdYlBu', 'RdYlGn', 'Spectral', 'coolwarm', 'bwr', 'seismic',
Expand Down Expand Up @@ -70,6 +69,22 @@ def plot_color_gradients(cmap_category, cmap_list):


# %%
#
# .. admonition:: Discouraged
#
# For backward compatibility we additionally support the following colormap
# names, which are identical to other builtin colormaps. Their use is
# discouraged. Use the suggested replacement instead.
#
# ========= =================================
# Colormap Use identical replacement instead
# ========= =================================
# gist_gray gray
# gist_yarg gray_r
# binary gray_r
# ========= =================================
#
#
# .. _reverse-cmap:
#
# Reversed colormaps
Expand Down
21 changes: 18 additions & 3 deletions galleries/users_explain/colors/colormaps.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,26 @@ def plot_color_gradients(category, cmap_list):
# an excellent example of this).

plot_color_gradients('Sequential (2)',
['binary', 'gist_yarg', 'gist_gray', 'gray', 'bone',
'pink', 'spring', 'summer', 'autumn', 'winter', 'cool',
'Wistia', 'hot', 'afmhot', 'gist_heat', 'copper'])
['gray', 'bone', 'pink', 'spring', 'summer', 'autumn',
'winter', 'cool', 'Wistia', 'hot', 'afmhot', 'gist_heat',
'copper'])

# %%
# .. admonition:: Discouraged
#
# For backward compatibility we additionally support the following colormap
# names, which are identical to other builtin colormaps. Their use is
# discouraged. Use the suggested replacement instead.
#
# ========= =================================
# Colormap Use identical replacement instead
# ========= =================================
# gist_gray gray
# gist_yarg gray_r
# binary gray_r
# ========= =================================
#
#
# Diverging
# ---------
#
Expand Down

Back | FazBrowse Home | New Git URL