Python package to extract the continuous colormaps from the palettable package for easier use. (Except for the Wes Anderson colour scales, they do not make sense as continuous maps)
palettable has to be installed.
Install from the repository using
pip install git+https://github.com/jk-rieck/colormaps_from_palettable.gitOnline interactive examples can be found here:
simple example
and here:
more realistic example
Example of how to extract the continuous colormaps from the
Scientific package and use
the Vik colormap. (Example requires packages numpy
and matplotlib)
import numpy as np
from matplotlib import pyplot as plt
import colormaps_from_palettable as cfp
cmaps = cfp.extract()['scientific']
some_sin = np.sin(np.linspace(0, np.pi, 20))
some_cos = np.cos(np.linspace(0, np.pi, 20))
some_data = some_sin[:, None] * some_cos[None, :]
plt.pcolormesh(some_data, cmap=cmaps['Vik'])
plt.colorbar()You can also clone this repository and run the example notebook or more realistic example notebook if you want to try out all the colormaps. (You need ipywidgets for that...)