mpl.widgets

GUI neutral widgets

Widgets that are designed to work for any of the GUI backends. All of these widgets require you to predefine a matplotlib.axes.Axes instance and pass that as the first arg. matplotlib doesn’t try to be too smart with respect to layout – you will have to figure out how wide and tall you want your Axes to be to accommodate your widget.

Functions

blended_transform_factory(x_transform, ...) Create a new “blended” transform using x_transform to transform the x-axis and y_transform to transform the y-axis.
dist(x, y) Return the distance between two points.

Classes

AxesWidget(ax) Widget that is connected to a single Axes.
Button(ax, label[, image, color, hovercolor]) A GUI neutral button.
CheckButtons(ax, labels, actives) A GUI neutral radio button.
Circle(xy[, radius]) A circle patch.
Cursor(ax[, horizOn, vertOn, useblit]) A horizontal and vertical line that spans the axes and moves with the pointer.
Ellipse(xy, width, height[, angle]) A scale-free ellipse.
EllipseSelector(ax, onselect[, drawtype, ...]) Select an elliptical region of an axes.
Lasso(ax, xy[, callback, useblit]) Selection curve of an arbitrary shape.
LassoSelector(ax[, onselect, useblit, ...]) Selection curve of an arbitrary shape.
Line2D(xdata, ydata[, linewidth, linestyle, ...]) A line - the line can have both a solid linestyle connecting all the vertices, and a marker at each vertex.
LockDraw() Some widgets, like the cursor, draw onto the canvas, and this is not desirable under all circumstances, like when the toolbar is in zoom-to-rect mode and drawing a rectangle.
MultiCursor(canvas, axes[, useblit, ...]) Provide a vertical (default) and/or horizontal line cursor shared between multiple axes.
RadioButtons(ax, labels[, active, activecolor]) A GUI neutral radio button.
Rectangle(xy, width, height[, angle]) Draw a rectangle with lower left at xy = (x, y) with specified width and height.
RectangleSelector(ax, onselect[, drawtype, ...]) Select a rectangular region of an axes.
Slider(ax, label, valmin, valmax[, valinit, ...]) A slider representing a floating point range.
SpanSelector(ax, onselect, direction[, ...]) Select a min/max range of the x or y axes for a matplotlib Axes.
SubplotTool(targetfig, toolfig) A tool to adjust the subplot params of a matplotlib.figure.Figure.
ToolHandles(ax, x, y[, marker, ...]) Control handles for canvas tools.
Widget Abstract base class for GUI neutral widgets
zip alias of izip