tools

Plotting tools for visualization

Source code

General Attributes and Methods

IceAdvect.tools.from_cpt(filename, use_extremes=True, **kwargs)[source]

Reads GMT color palette table files and registers the colormap to be recognizable by plt.cm.get_cmap()

Can import HSV (hue-saturation-value) or RGB values

Parameters:
filename: str

color palette table file

use_extremes: bool, default True

use the under, over and bad values from the cpt file

kwargs: dict

optional arguments for LinearSegmentedColormap

IceAdvect.tools.custom_colormap(N, map_name, **kwargs)[source]

Calculates a custom colormap and registers it to be recognizable by plt.cm.get_cmap()

Parameters:
N: int

number of slices in initial HSV color map

map_name: str

name of color map

  • 'Joughin': velocity colormap from Joughin et al. [2]

  • 'Rignot': velocity colormap from Rignot et al. [3]

  • 'Seroussi': divergence colormap from Seroussi et al. [4]

kwargs: dict

optional arguments for LinearSegmentedColormap