zapata.colormap module

Color control and choice

Colormap Selection

A number of colormap obtained from SciVis (https://sciviscolor.org/). The presently available colormap are shown below.

_images/colormap.png

Use make_cmap to generate a matplotlib class colormap based on the xml maps in the library above. make_cmap can also be used to generate a matplotlib colormap custom made as a xml file.

Utilities

zapata.colormap.make_cmap(xml, colpath='/Users/antonionavarra/Dropbox (CMCC)/ZapataLibrary/Zapata/zapata/SciVis_colormaps')[source]
Convert colormap from PARAVISION and SCIVISION
Parameters:
  • xml (str) -- Name colormap in xml format

  • colpath (path) -- Path to the location of xml colormap

Returns:

Colormap object

Return type:

colormap

zapata.colormap.load_xml(xml)[source]

Load colormap in xml format

Parameters:

xml (str) -- Name colormap in xml format

Returns:

colorvals Colorvalues data_vals Color scale

Return type:

dict

zapata.colormap.plot_cmap(colormap)[source]

Show colormap

zapata.colormap.viewcmap(DIR)[source]

Show colormaps in directory DIR

Colormaps are in xml format