Colorcet: Collection of perceptually uniform colormaps
|Latest dev release|
What is it?
Colorcet is a collection of perceptually uniform colormaps for use with Python plotting programs like bokeh, matplotlib, holoviews, and datashader based on the set of perceptually uniform colormaps created by Peter Kovesi at the Center for Exploration Targeting.
Colorcet supports Python 2.7, 3.5, 3.6 and 3.7 on Linux, Windows, or Mac and can be installed with conda:
conda install colorcet
or with pip:
pip install colorcet
Once installed you can copy the examples into the current directory using the colorcet command and run them using the Jupyter notebook:
colorcet examples cd colorcet-examples jupyter notebook
(Here colorcet examples is a shorthand for colorcet copy-examples --path colorcet-examples && colorcet fetch-data --path colorcet-examples.)
To work with JupyterLab you will also need the PyViz JupyterLab extension:
conda install -c conda-forge jupyterlab jupyter labextension install @pyviz/jupyterlab_pyviz
Once you have installed JupyterLab and the extension launch it with:
If you want to try out the latest features between releases, you can get the latest dev release by specifying -c pyviz/label/dev in place of -c pyviz.
For more information take a look at Getting Started.
The Matplotlib project also has a number of relevant resources, including an excellent 2015 SciPy talk, the viscm tool for creating maps like the four in mpl, the cmocean site collecting a set of maps created by viscm, and the discussion of how the mpl maps were created.
All the Colorcet colormaps that have short, memorable names (which are probably the most useful ones) are visible here:
But the complete set of 50+ is shown in the User Guide.
Colorcet, HoloViz, and PyViz
Colorcet is part of the HoloViz family of tools. The holoviz.org website shows how to use Colorcet together with other libraries to solve complex problems, with detailed tutorials and examples. Example projects using Colorcet are at examples.pyviz.org, and you can compare Colorcet to other available tools at pyviz.org.