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

Method get_bbox_for_cb

lib/matplotlib/_layoutgrid.py:393–411  ·  view source on GitHub ↗

Return the bounding box that includes the decorations but, *not* the colorbar...

(self, rows=0, cols=0)

Source from the content-addressed store, hash-verified

391 return bbox
392
393 def get_bbox_for_cb(self, rows=0, cols=0):
394 """
395 Return the bounding box that includes the
396 decorations but, *not* the colorbar...
397 """
398 rows = np.atleast_1d(rows)
399 cols = np.atleast_1d(cols)
400
401 bbox = Bbox.from_extents(
402 (self.lefts[cols[0]].value() +
403 self.margins['leftcb'][cols[0]].value()),
404 (self.bottoms[rows[-1]].value() +
405 self.margins['bottomcb'][rows[-1]].value()),
406 (self.rights[cols[-1]].value() -
407 self.margins['rightcb'][cols[-1]].value()),
408 (self.tops[rows[0]].value() -
409 self.margins['topcb'][rows[0]].value())
410 )
411 return bbox
412
413 def get_left_margin_bbox(self, rows=0, cols=0):
414 """

Callers 1

reposition_colorbarFunction · 0.80

Calls 2

from_extentsMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected