my_code_base.plot.colormoves

This module provides functions to read in colormaps generated with ColorMoves.

Sources:

Module Contents

my_code_base.plot.colormoves.plot_cmap(colormap)[source]

This is a quick example plotting the 8 by 1 gradient of the colormap

my_code_base.plot.colormoves.xml_to_cmap(xml)[source]

Convert an XML file to a matplotlib colormap.

Parameters:

xml (str) – The path to the XML file.

Returns:

The generated colormap.

Return type:

matplotlib.colors.LinearSegmentedColormap

Raises:
  • ValueError – If the length of position is not the same as colors.

  • ValueError – If position does not start with 0 and end with 1.

Source: http://schubert.atmos.colostate.edu/~cslocum/custom_cmap.html