StonerPlots API

stonerplots Package

Main package file of stonerplots.

Importing stonerplots will make the various context managers available, it will also modify the lists of matplotlib named colours and update the central matplotlib dictionary of stylesheets.

Attributes:
default (settings):

A singleton instance of a simple class that stores default values for the styles, formats and filename. These defaults are common for all code that uses stonerplots after it has been first imported.

Functions

counter(value[, pattern])

Format an integer as a string using a pattern and various representations.

roman(number)

Convert a positive integer to Roman numeral representation.

Classes

CentredAxes([x, y, include_open, use])

Remove the plot frame from all enclosed figures and move the axes to specified x,y values.

SavedFigure([filename, style, autoclose, ...])

A context manager for applying plotting styles and saving matplotlib figures.

InsetPlot([ax, loc, width, height, ...])

A context manager for creating inset plots in matplotlib with minimal effort.

StackVertical(number[, figure, joined, ...])

A context manager for generating a vertical stack of subplots with shared x-axes.

MultiPanel(panels[, figure, sharex, sharey, ...])

Context manager for creating multi-panel plots in Matplotlib.

DoubleYAxis([ax, legend, loc, colours, ...])

Context manager to facilitate plotting with dual Y-axes on a Matplotlib figure.

PlotLabeller(*args[, x, y, z])

Adjust the x and y axis tick formatters of plots created in the context handler.

TexFormatter()

An axis tick label formatter that emits Tex formula mode code.

TexEngFormatter([unit, places, sep, usetex, ...])

An axis tick label formatter that emits Tex formula mode code.