pttools.analysis.colormap

Utilities for color maps

Functions

pttools.analysis.colormap.cmap_lines(n, cmap=CMAP_DEFAULT)
Parameters:

cmap (Colormap | str)

Return type:

ndarray

pttools.analysis.colormap.cmap_plusminus(min_level, max_level, diff_level, cmap_neg=CMAP_NEG_DEFAULT, cmap_pos=CMAP_POS_DEFAULT)

Colormap for Matplotlib heatmap plots with different color schemes for positive and negative values

Parameters:
  • min_level (float)

  • max_level (float)

  • diff_level (float)

  • cmap_neg (Colormap | str)

  • cmap_pos (Colormap | str)

Return type:

Tuple[ndarray, List[float]]

pttools.analysis.colormap.color_region(ax, x, y, region, color=REGION_COLOR_DEFAULT, alpha=1)

Set a region on a plot to a fixed color

Parameters:
Return type:

QuadContourSet

pttools.analysis.colormap.get_cmap(cmap)

Get a color map from its name

If given a Colormap object, passes it through.

Parameters:

cmap (Colormap | str)

Return type:

Colormap