MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / get_inner_bbox

Method get_inner_bbox

lib/matplotlib/_layoutgrid.py:369–391  ·  view source on GitHub ↗

Return the inner bounding box of the subplot specs given by rows and cols. rows and cols can be spans.

(self, rows=0, cols=0)

Source from the content-addressed store, hash-verified

367 return bbox
368
369 def get_inner_bbox(self, rows=0, cols=0):
370 """
371 Return the inner bounding box of the subplot specs
372 given by rows and cols. rows and cols can be spans.
373 """
374 rows = np.atleast_1d(rows)
375 cols = np.atleast_1d(cols)
376
377 bbox = Bbox.from_extents(
378 (self.lefts[cols[0]].value() +
379 self.margins['left'][cols[0]].value() +
380 self.margins['leftcb'][cols[0]].value()),
381 (self.bottoms[rows[-1]].value() +
382 self.margins['bottom'][rows[-1]].value() +
383 self.margins['bottomcb'][rows[-1]].value()),
384 (self.rights[cols[-1]].value() -
385 self.margins['right'][cols[-1]].value() -
386 self.margins['rightcb'][cols[-1]].value()),
387 (self.tops[rows[0]].value() -
388 self.margins['top'][rows[0]].value() -
389 self.margins['topcb'][rows[0]].value())
390 )
391 return bbox
392
393 def get_bbox_for_cb(self, rows=0, cols=0):
394 """

Callers 3

test_corner_centerFunction · 0.95
_draw_shapeMethod · 0.45
test_modifying_arcFunction · 0.45

Calls 2

from_extentsMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected