shnitsel.vis.datasheet.figures.common

Attributes

symbols

Functions

figaxs_defaults(mosaic[, scale_factors, height_ratios])

Decorator to automatically create a mosaic of subfigures and provide the axes to the decorated function if only a figure is provided.

centertext(text, ax[, clearticks])

Helper method to center the text within the axes.

Module Contents

symbols
figaxs_defaults(mosaic, scale_factors=None, height_ratios=None)

Decorator to automatically create a mosaic of subfigures and provide the axes to the decorated function if only a figure is provided.

Parameters:
  • mosaic (list[HashableList[Hashable]]) – Matrix of keys, where the individual subplots should go

  • scale_factors (Sequence[float] , optional) – Sequence of scale factors for the individual plots. Defaults to None.

  • height_ratios (Sequence[float] , optional) – Height ratios of the individual plots. Defaults to None.

centertext(text, ax, clearticks='y')

Helper method to center the text within the axes.

Optionally removes ticks in the dimensions x or y.

Parameters:
  • text (str) – Message to center in the frame

  • ax (Axes) – Axes to plot the text into

  • clearticks (str, optional) – String of all dimensions to clear the ticks for (may contain x and/or y). Defaults to ‘y’.

Returns:

The Text object created by a call to .text() on the ax object.

Return type:

Text