Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 1.57 KB

index.md

File metadata and controls

58 lines (41 loc) · 1.57 KB

Colormap Catalog

To use any colormap in the catalog, you can pass its name to the [Colormap][cmap.Colormap] constructor:

from cmap import Colormap

cmap = Colormap('viridis')

!!!note "Coming from matplotlib?" We test against all of the named colormaps in matplotlib, so any 'name' that you can use with matplotlib.colormaps['name'] can also be passed to cmap.Colormap. To convert a cmap.Colormap to a native matplotlib.colors.Colormap instance, you may call [.to_mpl()][cmap.Colormap.to_matplotlib].

See the [Colormap API docs][cmap.Colormap] for details.

!!!tip "Tip: Reversed colormaps"

You can append `'_r'` to any of the colormap names listed below to get a
reversed version of that colormap. For example, `'viridis_r'`

{{ cmap: viridis }}
{{ cmap: viridis_r }}

This works with function based colormaps as well:

{{ cmap: cubehelix }}
{{ cmap: cubehelix_r }}

Colormaps by category { data-search-exclude }

{{ CMAP_CATALOG }}

<script>typeof(initFilters) !== 'undefined' && initFilters();</script>