plt#

Wrappers around matplotlib.pyplot functions.

The first call to a function in this module which draws, or sets a coordinate, enables astropy.visualization.quantity_support() for the rest of the session, so an astropy.units.Quantity is converted to the unit of its axis, and labels the axis with it, without enabling that support yourself. The data of a mesh or an image are the exception, since the colors of matplotlib carry no unit: they are drawn as bare values in their own unit, and the limits of the color scale are converted to it.

Functions

subplots([axis_rows, axis_cols, ncols, ...])

A thin wrapper around matplotlib.pyplot.subplots() which allows for providing axis names to the rows and columns.

plot(*args[, ax, axis, where, ...])

A thin wrapper around matplotlib.axes.Axes.plot() for named arrays.

line_collection(*args[, ax, axis, where, ...])

Plot a line as a sequence of separate segments.

fill(*args[, ax, axis, where, ...])

Plot filled polygons

scatter(*args[, s, c, ax, where, ...])

A thin wrapper around matplotlib.axes.Axes.scatter() for named arrays.

stairs(*args[, ax, axis, where])

A thin wrapper around matplotlib.axes.Axes.stairs() for named arrays.

axhline([y, xmin, xmax, ax])

A wrapper around matplotlib.axes.Axes.axhline().

axvline([x, ymin, ymax, ax])

A wrapper around matplotlib.axes.Axes.axvline().

axhspan(ymin, ymax[, xmin, xmax, ax])

A wrapper around matplotlib.axes.Axes.axhspan().

axvspan(xmin, xmax[, ymin, ymax, ax])

A wrapper around matplotlib.axes.Axes.axvspan().

imshow(X, *, axis_x, axis_y[, axis_rgb, ax, ...])

A thin wrappper around matplotlib.pyplot.imshow() for named arrays.

pcolormesh(*XY, C[, axis_rgb, ax, ...])

A thin wrapper around matplotlib.pyplot.pcolormesh() for named arrays.

rgbmesh(*WXY, C, axis_wavelength[, ax, ...])

A convenience function that calls pcolormesh() with the outputs from named_arrays.colorsynth.rgb() and returns a colorbar.

pcolormovie(*TXY, C, axis_time[, axis_rgb, ...])

Animate a sequence of images using matplotlib.animation.FuncAnimation and repeated calls to pcolormesh().

rgbmovie(*TWXY, C, axis_time, axis_wavelength)

A convenience function that calls pcolormovie() with the outputs from named_arrays.colorsynth.rgb() and returns an animation instance and a colorbar.

text(x, y, s[, ax])

A thin wrapper around matplotlib.axes.Axes.text() for named arrays.

annotate(text, xy[, xytext, components, ax, ...])

A thin wrapper around matplotlib.axes.Axes.annotate() for named arrays.

brace_vertical(x, width, ymin, ymax[, ax, ...])

Plot a vertical curly bracket at the given coordinates.

dimension(a, b[, offset, label, decimals, ...])

Annotate the distance between two points like a mechanical drawing.

dimension_angular(center, radius, angle_a, ...)

Annotate the angle between two directions like a mechanical drawing.

set_xlabel(xlabel[, ax])

A thin wrapper around matplotlib.axes.Axes.set_xlabel() for named arrays.

get_xlabel([ax])

A thin wrapper around matplotlib.axes.Axes.get_xlabel() for named arrays.

set_ylabel(ylabel[, ax])

A thin wrapper around matplotlib.axes.Axes.set_ylabel() for named arrays.

get_ylabel([ax])

A thin wrapper around matplotlib.axes.Axes.get_ylabel() for named arrays.

set_xlim([left, right, ax])

A thin wrapper around matplotlib.axes.Axes.set_xlim() for named arrays.

get_xlim([ax])

A thin wrapper around matplotlib.axes.Axes.get_xlim() for named arrays.

set_ylim([bottom, top, ax])

A thin wrapper around matplotlib.axes.Axes.set_ylim() for named arrays.

get_ylim([ax])

A thin wrapper around matplotlib.axes.Axes.get_ylim() for named arrays.

set_title(label[, ax])

A thin wrapper around matplotlib.axes.Axes.set_title() for named arrays.

get_title([ax])

A thin wrapper around matplotlib.axes.Axes.get_title() for named arrays.

set_xscale(value[, ax])

A thin wrapper around matplotlib.axes.Axes.set_xscale() for named arrays.

get_xscale([ax])

A thin wrapper around matplotlib.axes.Axes.get_xscale() for named arrays.

set_yscale(value[, ax])

A thin wrapper around matplotlib.axes.Axes.set_yscale() for named arrays.

get_yscale([ax])

A thin wrapper around matplotlib.axes.Axes.get_yscale() for named arrays.

set_aspect(aspect[, ax])

A thin wrapper around matplotlib.axes.Axes.set_aspect() for named arrays.

get_aspect([ax])

A thin wrapper around matplotlib.axes.Axes.get_aspect() for named arrays.

transAxes([ax])

A thin wrapper around matplotlib.axes.Axes.transAxes for named arrays.

transData([ax])

A thin wrapper around matplotlib.axes.Axes.transData for named arrays.

twinx([ax])

A thin wrapper around matplotlib.axes.Axes.twinx() for named arrays.

twiny([ax])

A thin wrapper around matplotlib.axes.Axes.twiny() for named arrays.

invert_xaxis([ax])

A thin wrapper around matplotlib.axes.Axes.invert_xaxis() for named arrays.

invert_yaxis([ax])

A thin wrapper around matplotlib.axes.Axes.invert_yaxis() for named arrays.