MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / union

Method union

site-packages/matplotlib/transforms.py:727–737  ·  view source on GitHub ↗

Return a :class:`Bbox` that contains all of the given bboxes.

(bboxes)

Source from the content-addressed store, hash-verified

725
726 @staticmethod
727 def union(bboxes):
728 """
729 Return a :class:`Bbox` that contains all of the given bboxes.
730 """
731 if not len(bboxes):
732 raise ValueError("'bboxes' cannot be empty")
733 x0 = np.min([bbox.xmin for bbox in bboxes])
734 x1 = np.max([bbox.xmax for bbox in bboxes])
735 y0 = np.min([bbox.ymin for bbox in bboxes])
736 y1 = np.max([bbox.ymax for bbox in bboxes])
737 return Bbox([[x0, y0], [x1, y1]])
738
739 @staticmethod
740 def intersection(bbox1, bbox2):

Callers 15

__len__Method · 0.45
__iter__Method · 0.45
__init__Method · 0.45
get_tightbboxMethod · 0.45
get_tightbboxMethod · 0.45
get_window_extentMethod · 0.45
composite_imagesFunction · 0.45
get_ticklabel_extentsMethod · 0.45
get_tightbboxMethod · 0.45

Calls 3

BboxClass · 0.85
minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected