mpl.offsetbox

The OffsetBox is a simple container artist. The child artist are meant to be drawn at a relative position to its parent. The [VH]Packer, DrawingArea and TextArea are derived from the OffsetBox.

The [VH]Packer automatically adjust the relative postisions of their children, which should be instances of the OffsetBox. This is used to align similar artists together, e.g., in legend.

The DrawingArea can contain any Artist as a child. The DrawingArea has a fixed width and height. The position of children relative to the parent is fixed. The TextArea is contains a single Text instance. The width and height of the TextArea instance is the width and height of the its child text.

Functions

bbox_artist(*args, **kwargs)
mbbox_artist(artist, renderer[, props, fill]) This is a debug function to draw a rectangle around the bounding box returned by get_window_extent() of an artist, to test whether the artist is returning the correct bbox.

Classes

AnchoredOffsetbox(loc[, pad, borderpad, ...]) An offset box placed according to the legend location loc.
AnchoredText(s, loc[, pad, borderpad, prop]) AnchoredOffsetbox with Text.
AnnotationBbox(offsetbox, xy[, xybox, ...]) Annotation-like class, but with offsetbox instead of Text.
AuxTransformBox(aux_transform) Offset Box with the aux_transform .
Bbox(points, **kwargs) A mutable bounding box.
BboxBase([shorthand_name]) This is the base class of all bounding boxes, and provides read-only access to its data.
BboxImage(bbox[, cmap, norm, interpolation, ...]) The Image class whose size is determined by the given bbox.
DraggableAnnotation(annotation[, use_blit])
DraggableBase(ref_artist[, use_blit]) helper code for a draggable artist (legend, offsetbox)
DraggableOffsetBox(ref_artist, offsetbox[, ...])
DrawingArea(width, height[, xdescent, ...]) The DrawingArea can contain any Artist as a child.
FancyArrowPatch([posA, posB, path, ...]) A fancy arrow patch.
FancyBboxPatch(xy, width, height[, ...]) Draw a fancy box around a rectangle with lower left at xy*=(*x, y) with specified width and height.
FontProperties([family, style, variant, ...]) A class for storing and manipulating font properties.
HPacker([pad, sep, width, height, align, ...]) The HPacker has its children packed horizontally.
OffsetBox(*args, **kwargs) The OffsetBox is a simple container artist.
OffsetImage(arr[, zoom, cmap, norm, ...])
PackerBase([pad, sep, width, height, align, ...])
PaddedBox(child[, pad, draw_frame, patch_attrs])
TextArea(s[, textprops, multilinebaseline, ...]) The TextArea is contains a single Text instance.
TransformedBbox(bbox, transform, **kwargs) A Bbox that is automatically transformed by a given transform.
VPacker([pad, sep, width, height, align, ...]) The VPacker has its children packed vertically.
xrange xrange(start, stop[, step]) -> xrange object
zip alias of izip