In case of matplotlib it is possible to get the list of available colors (names) with:
import matplotlib.pyplot as plt
x = list(plt.colormaps())
Despite googling I was unable to find equivalent of it for Proplot module. https://proplot.readthedocs.io/en/latest/colormaps.html How to access those?
CodePudding user response:
Not sure if there is a function you can call, but you could just access the CMAPS_TABLE
variable directly from pplt.demos.py
. I.e.:
import proplot as pplt
colors = pplt.demos.CMAPS_TABLE
# result `head` of dict:
from itertools import islice
dict(islice(colors.items(), 0, 5))
{'Grayscale': ('Greys', 'Mono', 'MonoCycle'),
'Matplotlib sequential': ('viridis', 'plasma', 'inferno', 'magma', 'cividis'),
'Matplotlib cyclic': ('twilight',),
'Seaborn sequential': ('Rocket', 'Flare', 'Mako', 'Crest'),
'Seaborn diverging': ('IceFire', 'Vlag')}