register_cmaps

register_cmaps(user=True, default=False)[source]

Register colormaps packaged with ProPlot or saved to the ~/.proplot/cmaps folder. This is called on import. Colormaps are registered according to their filenames – for example, name.xyz will be registered as 'name'.

Valid file extensions are as follows:

Extension

Description

.hex

List of HEX strings in any format (comma-separated, separate lines, with double quotes… anything goes).

.xml

XML files with <Point .../> tags specifying x, r, g, b, and (optionally) o parameters, where x is the coordinate and the rest are the red, blue, green, and opacity channel values.

.rgb, .txt

3-4 column table of red, blue, green, and (optionally) opacity channel values, delimited by commas or spaces. If values larger than 1 are detected, they are assumed to be on the 0-255 scale and are divided by 255.

To visualize the registered colormaps, use show_cmaps.

Parameters
  • user (bool, optional) – Whether to reload user colormaps. Default is True.

  • default (bool, optional) – Whether to reload default proplot colormaps. Default is False.