API reference#

Figure and MultiFigure#

Figure

This class implements a general figure object.

MultiFigure

This class implements the "canvas" on which multiple plots are displayed.

SmartFigure

This class implements a figure object for plotting Plottable elements.

SmartFigureWCS

This class implements a figure object for plotting Plottable elements with a astropy.wcs.WCS projection.

SmartTwinAxis

This class implements a twin axis for the SmartFigure and SmartFigureWCS classes.

Plottables#

Arrow

This class implements an arrow object.

Circle

This class implements a Circle object with a given center and radius.

Contour

This class implements contour plots.

Curve

This class implements a general continuous curve.

Ellipse

This class implements an Ellipse object with a given center, two radii and an optional rotation angle.

FitFromExponential

Create a curve fit (continuous Curve) from an existing Curve object using an exponential fit.

FitFromFOTF

Create a curve fit (continuous Curve) from an existing Curve object using a first order transfer function (FOTF) fit.

FitFromFunction

Create a curve fit (continuous Curve) from a Curve object using an arbitrary function passed as an argument.

FitFromGaussian

Create a curve fit (continuous Curve) from an existing Curve object using a gaussian fit.

FitFromLog

Create a curve fit (continuous Curve) from an existing Curve object using a logarithmic fit.

FitFromPolynomial

Creates a curve fit (continuous Curve) from an existing curve object using a polynomial fit.

FitFromSine

Create a curve fit (continuous Curve) from an existing Curve object using a sinusoidal fit.

FitFromSquareRoot

Create a curve fit (continuous Curve) from an existing Curve object using a square root fit.

Heatmap

The class implements heatmaps.

Histogram

This class implements a general histogram.

Hlines

This class implements simple horizontal lines.

Line

This class implements a line object.

PlottableAxMethod

This experimental class allows to call any matplotlib Axes method as a plottable element in a SmartFigure.

Point

This class implements a point object.

Polygon

This class implements a Polygon object.

Rectangle

This class implements a Rectangle object with a given bottom left corner, width and height.

Scatter

This class implements a general scatter plot.

Stream

This class implements stream plots.

Table

This class allows to plot a table inside a Figure or MultiFigure.

Text

This class allows text to be plotted.

VectorField

This class implements vector fields.

Vlines

This class implements simple vertical lines.

Legend elements#

LegendLine

This class implements a legend line wrapping the Line2D object for creating custom legend entries with the set_custom_legend() method.

LegendMarker

This class implements a legend marker wrapping the Line2D object with a marker style set for creating custom legend entries with the set_custom_legend() method.

LegendPatch

This class implements a legend patch wrapping the Patch object for creating custom legend entries with the set_custom_legend() method.

Utility functions#

get_color

Returns a color from the specified style (user created, GL, or Matplotlib style).

get_colors

Returns a list of colors from the specified style (user created, GL, or Matplotlib style).

get_default_style

Returns the default style.

get_styles

Returns a list or dict of available styles.

set_default_style

Sets the default style.

Tools#

MathematicalObject

This class implements the __r* (reverse) and __i* (inplace) methods for adding, subtracting, multiplying, dividing and raising to a power an object that implements the direct methods.