File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Original file line number Diff line number Diff line change 5
5
6
6
Reference for colormaps included with Matplotlib.
7
7
8
+ A reversed version of each of these colormaps is available by appending
9
+ ``_r`` to the name, as illustrated in :ref:`reverse-cmap`.
10
+
8
11
See :doc:`/tutorials/colors/colormaps` for an in-depth discussion about
9
12
colormaps, including colorblind-friendliness.
10
13
"""
@@ -64,15 +67,13 @@ def plot_color_gradients(cmap_category, cmap_list):
64
67
65
68
66
69
###############################################################################
70
+ # .. _reverse-cmap:
67
71
# Reversing a colormap
68
72
# --------------------
69
73
#
70
- # A reversed version of any colormap is available by appending ``_r`` to the
71
- # name, for example:
74
+ # A colormap can be reversed by appending ``_r`` to the name. For example:
72
75
73
- plot_color_gradients ("Reversed " ,
74
- ['viridis_r' , 'Greys_r' , 'PiYG_r' ,
75
- 'twilight_r' , 'Pastel1_r' , 'ocean_r' ])
76
+ plot_color_gradients ("Original and reversed " , ['viridis' , 'viridis_r' ])
76
77
77
78
#############################################################################
78
79
#
You can’t perform that action at this time.
0 commit comments