python_codes.theme.truncate_colormap#

truncate_colormap(cmap, minval=0.0, maxval=1.0, n=100)[source]#

Truncate a given colormap.

Parameters
  • cmap (matplotlib colormap.) – Input colormap to be truncated.

  • minval (float) – Where to start the wanted colormap, assuming that 0 is the start of the input colormap, and 1 its end (the default is 0.0).

  • maxval (type) – Where to start the wanted colormap, assuming that 0 is the start of the input colormap, and 1 its end (the default is 0.0).

  • n (type) – Description of parameter n (the default is 100).

Returns

Description of returned object.

Return type

type