mpl.path.get_path_collection_extents()

mpl.path.get_path_collection_extents(master_transform, paths, transforms, offsets, offset_transform)[source]

Given a sequence of Path objects, Transform objects and offsets, as found in a PathCollection, returns the bounding box that encapsulates all of them.

master_transform is a global transformation to apply to all paths

paths is a sequence of Path instances.

transforms is a sequence of Affine2D instances.

offsets is a sequence of (x, y) offsets (or an Nx2 array)

offset_transform is a Affine2D to apply to the offsets before applying the offset to the path.

The way that paths, transforms and offsets are combined follows the same method as for collections. Each is iterated over independently, so if you have 3 paths, 2 transforms and 1 offset, their combinations are as follows:

(A, A, A), (B, B, A), (C, A, A)