mpl_toolkits.axes_grid1.axes_size#

Provides classes of simple units that will be used withAxesDividerclass (or others) to determine the size of each Axes. The unitclasses defineget_size method that returns a tuple of two floats,meaning relative and absolute sizes, respectively.

Note that this class is nothing more than a simple tuple of twofloats. Take a look at the Divider class to see how these twovalues are used.

Once created, the unit classes can be modified by simple arithmeticoperations: addition /subtraction with another unit type or a real number and scaling(multiplication or division) by a real number.

Classes#

Add(a, b)

Sum of two sizes.

AxesX(axes[, aspect, ref_ax])

Scaled size whose relative part corresponds to the data width of theaxes multiplied by theaspect.

AxesY(axes[, aspect, ref_ax])

Scaled size whose relative part corresponds to the data height of theaxes multiplied by theaspect.

Fixed(fixed_size)

Simple fixed size with absolute part =fixed_size and relative part = 0.

Fraction(fraction, ref_size)

An instance whose size is afraction of theref_size.

MaxExtent(artist_list, w_or_h)

Size whose absolute part is either the largest width or the largest height of the givenartist_list.

MaxHeight(artist_list)

Size whose absolute part is the largest height of the givenartist_list.

MaxWidth(artist_list)

Size whose absolute part is the largest width of the givenartist_list.

Scalable

alias ofScaled

Scaled(scalable_size)

Simple scaled(?) size with absolute part = 0 and relative part =scalable_size.

Functions#

from_any(size[, fraction_ref])

Create a Fixed unit when the first argument is a float, or a Fraction unit if that is a string that ends with %.

On this page