cmocean

matplotlib.org ↗

Choose scientific colour maps to match the structure of your data.

SI Score
80/100
Pricing
Open Source AI reading, not confirmed
Free plan
Not confirmed
Sign-up required
Not confirmed

Ask SI about cmocean

Answers use saved listing facts and recorded sources.
Homepage screenshot
Screenshot of the cmocean homepage

What it does

cmocean supplies colour maps developed for oceanographic variables. Its collection includes ordered scales, scales centred on a midpoint and cyclic maps, with Python tools for plotting, reversing, cropping and sampling them. The Python package is distributed under the MIT open-source licence.

Install cmocean, import it and select a map from cmocean.cm for a Matplotlib plot. Thermal runs from cooler dark blues to warmer yellows; phase is cyclic. The gallery and lightness plots help explain these different structures.

Append _r to a map name to reverse it. Cropping tools trim a scale by percentage or by the data range and central value. Export tools can write 256 RGB samples per map to text files or create a sampled colour dictionary.

The optional plotting submodule needs the extra cmocean[plots] installation, which adds viscm and colorspacious. The MIT licence allows commercial reuse with its copyright and permission notices retained.

Strengths

  • Examples connect colour-map choices to scientific data.
  • Maps can be cropped, reversed or exported as numerical colour samples.

Watch out for

  • The diagnostic plotting helpers require extra dependencies.

Best for

  • Scientists and data designers preparing oceanographic or related numerical plots.

Sources