classmatplotlib.transforms.BboxBase(shorthand_name=None)[source]
 
Bases: matplotlib.transforms.TransformNode The base class of all bounding boxes. This class is immutable; Bbox is a mutable subclass. The canonical representation is as two points, with no restrictions on their ordering. Convenience properties are provided to get the left, bottom, right and top edges and width and height, but these are not stored explicitly.  Parameters 
 
shorthand_namestr


A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True.       __array__(*args, **kwargs)[source]

   __module__='matplotlib.transforms'

   anchored(c, container=None)[source]
 
Return a copy of the Bbox anchored to c within container.  Parameters 
 
c(float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}


Either an (x, y) pair of relative coordinates (0 is left or bottom, 1 is right or top), 'C' (center), or a cardinal direction ('SW', southwest, is bottom left, etc.).  
containerBbox, optional


The box within which the Bbox is positioned; it defaults to the initial Bbox.      See also  Axes.set_anchor
  
   propertybounds
 
Return (x0, y0, width, height). 
   coefs={'C': (0.5, 0.5), 'E': (1.0, 0.5), 'N': (0.5, 1.0), 'NE': (1.0, 1.0), 'NW': (0, 1.0), 'S': (0.5, 0), 'SE': (1.0, 0), 'SW': (0, 0), 'W': (0, 0.5)}

   contains(x, y)[source]
 
Return whether (x, y) is in the bounding box or on its edge. 
   containsx(x)[source]
 
Return whether x is in the closed (x0, x1) interval. 
   containsy(y)[source]
 
Return whether y is in the closed (y0, y1) interval. 
   corners()[source]
 
Return the corners of this rectangle as an array of points. Specifically, this returns the array [[x0, y0], [x0, y1], [x1, y0], [x1, y1]]. 
   count_contains(vertices)[source]
 
Count the number of vertices contained in the Bbox. Any vertices with a non-finite x or y value are ignored.  Parameters 
 
verticesNx2 Numpy array.

   
   count_overlaps(bboxes)[source]
 
Count the number of bounding boxes that overlap this one.  Parameters 
 
bboxessequence of BboxBase

   
   expanded(sw, sh)[source]
 
Construct a Bbox by expanding this one around its center by the factors sw and sh. 
   propertyextents
 
Return (x0, y0, x1, y1). 
   frozen()[source]
 
The base class for anything that participates in the transform tree and needs to invalidate its parents or be invalidated. This includes classes that are not really transforms, such as bounding boxes, since some transforms depend on bounding boxes to compute their values. 
   fully_contains(x, y)[source]
 
Return whether x, y is in the bounding box, but not on its edge. 
   fully_containsx(x)[source]
 
Return whether x is in the open (x0, x1) interval. 
   fully_containsy(y)[source]
 
Return whether y is in the open (y0, y1) interval. 
   fully_overlaps(other)[source]
 
Return whether this bounding box overlaps with the other bounding box, not including the edges.  Parameters 
 
otherBboxBase

   
   get_points()[source]

   propertyheight
 
The (signed) height of the bounding box. 
   staticintersection(bbox1, bbox2)[source]
 
Return the intersection of bbox1 and bbox2 if they intersect, or None if they don't. 
   propertyintervalx
 
The pair of x coordinates that define the bounding box. This is not guaranteed to be sorted from left to right. 
   propertyintervaly
 
The pair of y coordinates that define the bounding box. This is not guaranteed to be sorted from bottom to top. 
   is_affine=True

   is_bbox=True

   propertymax
 
The top-right corner of the bounding box. 
   propertymin
 
The bottom-left corner of the bounding box. 
   overlaps(other)[source]
 
Return whether this bounding box overlaps with the other bounding box.  Parameters 
 
otherBboxBase

   
   propertyp0
 
The first pair of (x, y) coordinates that define the bounding box. This is not guaranteed to be the bottom-left corner (for that, use min). 
   propertyp1
 
The second pair of (x, y) coordinates that define the bounding box. This is not guaranteed to be the top-right corner (for that, use max). 
   padded(p)[source]
 
Construct a Bbox by padding this one on all four sides by p. 
   rotated(radians)[source]
 
Return the axes-aligned bounding box that bounds the result of rotating this Bbox by an angle of radians. 
   shrunk(mx, my)[source]
 
Return a copy of the Bbox, shrunk by the factor mx in the x direction and the factor my in the y direction. The lower left corner of the box remains unchanged. Normally mx and my will be less than 1, but this is not enforced. 
   shrunk_to_aspect(box_aspect, container=None, fig_aspect=1.0)[source]
 
Return a copy of the Bbox, shrunk so that it is as large as it can be while having the desired aspect ratio, box_aspect. If the box coordinates are relative (i.e. fractions of a larger box such as a figure) then the physical aspect ratio of that figure is specified with fig_aspect, so that box_aspect can also be given as a ratio of the absolute dimensions, not the relative dimensions. 
   propertysize
 
The (signed) width and height of the bounding box. 
   splitx(*args)[source]
 
Return a list of new Bbox objects formed by splitting the original one with vertical lines at fractional positions given by args. 
   splity(*args)[source]
 
Return a list of new Bbox objects formed by splitting the original one with horizontal lines at fractional positions given by args. 
   transformed(transform)[source]
 
Construct a Bbox by statically transforming this one by transform. 
   translated(tx, ty)[source]
 
Construct a Bbox by translating this one by tx and ty. 
   staticunion(bboxes)[source]
 
Return a Bbox that contains all of the given bboxes. 
   propertywidth
 
The (signed) width of the bounding box. 
   propertyx0
 
The first of the pair of x coordinates that define the bounding box. This is not guaranteed to be less than x1 (for that, use xmin). 
   propertyx1
 
The second of the pair of x coordinates that define the bounding box. This is not guaranteed to be greater than x0 (for that, use xmax). 
   propertyxmax
 
The right edge of the bounding box. 
   propertyxmin
 
The left edge of the bounding box. 
   propertyy0
 
The first of the pair of y coordinates that define the bounding box. This is not guaranteed to be less than y1 (for that, use ymin). 
   propertyy1
 
The second of the pair of y coordinates that define the bounding box. This is not guaranteed to be greater than y0 (for that, use ymax). 
   propertyymax
 
The top edge of the bounding box. 
   propertyymin
 
The bottom edge of the bounding box.