|
35 | 35 | import numpy as np
|
36 | 36 | import matplotlib.pyplot as plt
|
37 | 37 |
|
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'])] |
39 | 60 |
|
40 | 61 |
|
41 | 62 | nrows = max(len(cmap_list) for cmap_category, cmap_list in cmaps)
|
|
0 commit comments