Package: scicm
SciCM: Scientific Colour MapsSciCMis a Python package aimed at providing a large set of colour maps designed for scientific data visualisation.
The colour maps inSciCMhave been designed to be as interchangeable as possible within the same category, e.g., all diverging colour maps included inSciCMdo an (almost) equal job of displaying the data.
All colour maps included inSciCMremain readable for people with red-green colour blindness (the most common type).
This design frees the user in their choice of colour map to use for their data visualisation.SciCMalso includes some simple colour map manipulation tools, for users that want to further customise their colour maps.Quick startUpon importingSciCM, the colour maps are registered with matplotlib, so they can be accessed by passingcmap='scicm.cmapname'to any plotting function that accepts a colour map (e.g. thecmapkeyword in matplotlib).
The colour map objects themselves can also be explicitly accessed usingscicm.cm.cmapname.
All colour maps have a reversed version, accessible through the same naming convention used by matplotlib (i.e.cmapname_r).A simple example ofSciCMin use:importnumpyasnp,matplotlib.pyplotasplt,scicmx=np.random.default_rng().normal(size=(200,200))plt.imshow(x,cmap='scicm.Stone')plt.show()Included Colour MapsDocumentation and use guidesSciCM's GitHub Wiki contains anextended quick start guide, thefull documentationof the package, and aguide on how to choose the best colour map for your data.SciCMin the broader colour map Python package ecosystemSciCMis not the first package to include "good" (perceptually-uniform) colour maps, but meaningfully expands the current availabily of such maps.
Compared to other similar packages:matplotlib: Includes only 5 perceptually-uniform maps, which is less than 10% of all the available colour maps. The main aim ofSciCMis to provide perceptually-uniform alternatives to the sequential, diverging, and cyclic colour map types inmatplotlib.ColorCET: Perhaps the closest colour map package toSciCMin both scope and size. The main difference being thatColorCETfeatures a large set of variations for a small number of individual colour maps, whereasSciCMprovides a large set of variations for a small number of colour map "types".cmocean: A relatively small set of perceptually uniform colour maps, with a design clearly catered for geographic and oceanographic use. Of note is theoxycolour map included incmocean, which was the main source of inspiration forSciCM's segmented category of colour maps.CMasher: While there is some overlap between both packages,CMasherandSciCMare natural companions, as the two focus on offering alternatives to different sets ofmatplotlib's colour map categories.Installation guideThe package is available for installation using pip:>pip install scicmAlthough you may wish to install it directly from GitHub, the following example being for themasterbranch:>pip install git+https://github.com/MBravoS/scicm.git@masterHow to cite the use ofSciCMIf you are submitting work that usesSciCMfor publication in a scientific journal, please include a mention of your use.
Some journals include a dedicated section for this purpose (e.g., theSoftwaresection in the Astrophysical Journal), which would be the natural place to mention SciCM (please include a link to this repository).
If such a section is not included on your journal or choice, please consider adding the following to your acknowledgements:The analysis in this work has been performed using the Python programming language, with the open-source packageSciCM(https://github.com/MBravoS/scicm).Feel free to expand the previous statement to include the rest of the sofware used in your work!
Note that we aim to submitSciCMfor publication sometime in 2023, so how to acknowledge your use ofSciCMwill (hopefully) soon change.