topostats.theme#

Custom Bruker Nanoscope colorscale.

Module Contents#

Classes#

Colormap

Class for setting the Colormap.

Attributes#

LOGGER

topostats.theme.LOGGER#
class topostats.theme.Colormap(name: str = 'nanoscope')#

Class for setting the Colormap.

Parameters:

name (str) – Name of colormap to use.

__str__() str#

Return string representation of object.

Returns:

String detailing the colormap.

Return type:

str

set_cmap(name: str) None#

Set the ColorMap.

Parameters:

name (str) – Name of the colormap to return.

get_cmap() matplotlib.cm#

Return the matplotlib.cm colormap object.

Returns:

Matplotlib Color map object.

Return type:

matplotlib.cm

static nanoscope() matplotlib.colors.LinearSegmentedColormap#

Matplotlib compatible colormap that replicates the Bruker Nanoscope colorscale.

The colormap is implemented in Gwyddion’s GwyGradient via ‘Nanoscope.txt’.

Returns:

MatplotLib LinearSegmentedColourmap that replicates Bruker Nanoscope colorscale.

Return type:

LinearSegmentedColormap

static gwyddion() matplotlib.colors.LinearSegmentedColormap#

Set RGBA colour map for the Gwyddion.net colour gradient.

Returns:

The ‘gwyddion’ colormap.

Return type:

LinearSegmentedColormap

static blu() matplotlib.colors.ListedColormap#

Set RGBA colour map of just the colour blue.

Returns:

The ‘blu’ colormap.

Return type:

ListedColormap