10000 Can't reuse mapping here. · matplotlib/matplotlib@ba19f2b · GitHub
[go: up one dir, main page]

Skip to content

Commit ba19f2b

Browse files
committed
Can't reuse mapping here.
1 parent e3bdf44 commit ba19f2b

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

examples/color/colormaps_reference.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,28 @@
3535
import numpy as np
3636
import matplotlib.pyplot as plt
3737

38-
from colormaps import cmaps
38+
# Have colormaps separated into categories:
39+
# http://matplotlib.org/examples/color/colormaps_reference.html
40+
41+
cmaps = [('Perceptually Uniform Sequential',
42+
['viridis', 'inferno', 'plasma', 'magma']),
43+
('Sequential', ['Blues', 'BuGn', 'BuPu',
44+
'GnBu', 'Greens', 'Greys', 'Oranges', 'OrRd',
45+
'PuBu', 'PuBuGn', 'PuRd', 'Purples', 'RdPu',
46+
'Reds', 'YlGn', 'YlGnBu', 'YlOrBr', 'YlOrRd']),
47+
('Sequential (2)', ['afmhot', 'autumn', 'bone', 'cool',
48+
'copper', 'gist_heat', 'gray', 'hot',
49+
'pink', 'spring', 'summer', 'winter']),
50+
('Diverging', ['BrBG', 'bwr', 'coolwarm', 'PiYG', 'PRGn', 'PuOr',
51+
'RdBu', 'RdGy', 'RdYlBu', 'RdYlGn', 'Spectral',
52+
'seismic']),
53+
('Qualitative', ['Accent', 'Dark2', 'Paired', 'Pastel1',
54+
'Pastel2', 'Set1', 'Set2', 'Set3']),
55+
('Miscellaneous', ['gist_earth', 'terrain', 'ocean', 'gist_stern',
56+
'brg', 'CMRmap', 'cubehelix',
57+
'gnuplot', 'gnuplot2', 'gist_ncar',
58+
'nipy_spectral', 'jet', 'rainbow',
59+
'gist_rainbow', 'hsv', 'flag', 'prism'])]
3960

4061

4162
nrows = max(len(cmap_list) for cmap_category, cmap_list in cmaps)

0 commit comments

Comments
 (0)
0