matplotlib

The matplotlib module adds many useful wrappers for matplotlib classes and functions. It requires matplotlib>=1.5.

Setting Up

setup_axes([rows, cols, figsize, expand]) Sets up a figure of size figsize with a number of rows (rows) and columns (cols).
setup_figure([rows, cols]) Sets up a figure with a number of rows (rows) and columns (cols), **kwargs passes through to matplotlib.figure.Figure.

Plotting

NonUniformImage(x, y, z[, ax, fig, cmap, ...]) Used to plot a set of coordinates.
NonUniformImage_axes(img) Returns axes x, y for a given image img to be used with scisalt.matplotlib.NonUniformImage.
addlabel([ax, toplabel, xlabel, ylabel, ...]) Adds labels to a plot.
axesfontsize(ax, fontsize) Change the font size for the title, x and y labels, and x and y tick labels for axis ax to fontsize.
colorbar(ax, im[, fig, loc, size, pad]) Adds a polite colorbar that steals space so matplotlib.pyplot.tight_layout works nicely.
contour(X[, ax, add_cbar, rescale_fig]) Plots an array X such that the first coordinate is the x coordinate and the second coordinate is the y coordinate, with the origin at the bottom left corner.
figure([title]) Creates a figure with **kwargs with a window title title.
hist(x[, bins, labels, aspect, plot, ax, range]) Creates a histogram of data x with a bins, labels = [title, xlabel, ylabel].
hist2d(x, y[, bins, labels, aspect, plot, ...]) Creates a 2-D histogram of data x, y with bins, labels = [title, xlabel, ylabel], aspect ration aspect.
imshow(X[, ax, add_cbar, rescale_fig]) Plots an array X such that the first coordinate is the x coordinate and the second coordinate is the y coordinate, with the origin at the bottom left corner.
imshow_batch(images[, cbar, show, pdf, ...]) Plots an array of images to a single window of size figsize with rows and columns.
less_labels(ax[, x_fraction, y_fraction]) Scale the number of tick labels in x and y by x_fraction and y_fraction respectively.
pcolor_axes(array[, px_to_units]) Return axes x, y for array to be used with matplotlib.pyplot.color.
plot(*args[, ax]) Plots but automatically resizes x axis.
plot_featured(*args, **kwargs) Wrapper for matplotlib.pyplot.plot() / errorbar().
quiver(*args[, ax, rescale_fig]) Plots an array X such that the first coordinate is the x coordinate and the second coordinate is the y coordinate, with the origin at the bottom left corner.

Interactive Plotting

Imshow_Slider(image[, usecbar]) Convenience class for viewing images.
Imshow_Slider_Array(images[, usecbar]) Convenience class for viewing images.
RectangleSelector(ax, *args[, selfunc, ...]) Add rectangle selection to an already-existing axis.

Utilities

rgb2gray(image) Convert an rgb image to grayscale.
savefig(filename[, path, fig, ext, verbose]) Save the figure fig (optional, if not specified, latest figure in focus) to filename in the path path with extension ext.
scaled_figsize(X[, figsize, h_pad, v_pad]) Given an array X, determine a good size for the figure to be by shrinking it to fit within figsize.
showfig(fig[, aspect]) Shows a figure with a typical orientation so that x and y axes are set up as expected.