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

Method padded

lib/matplotlib/transforms.py:623–638  ·  view source on GitHub ↗

Construct a `Bbox` by padding this one on all four sides. Parameters ---------- w_pad : float Width pad h_pad : float, optional Height pad. Defaults to *w_pad*.

(self, w_pad, h_pad=None)

Source from the content-addressed store, hash-verified

621 return Bbox(self._points + a)
622
623 def padded(self, w_pad, h_pad=None):
624 """
625 Construct a `Bbox` by padding this one on all four sides.
626
627 Parameters
628 ----------
629 w_pad : float
630 Width pad
631 h_pad : float, optional
632 Height pad. Defaults to *w_pad*.
633
634 """
635 points = self.get_points()
636 if h_pad is None:
637 h_pad = w_pad
638 return Bbox(points + [[-w_pad, -h_pad], [w_pad, h_pad]])
639
640 def translated(self, tx, ty):
641 """Construct a `Bbox` by translating this one by *tx* and *ty*."""

Callers 11

get_bboxMethod · 0.80
get_bboxMethod · 0.80
get_window_extentMethod · 0.80
get_bboxMethod · 0.80
_get_anchored_bboxFunction · 0.80
print_figureMethod · 0.80
writeMarkersMethod · 0.80

Calls 2

get_pointsMethod · 0.95
BboxClass · 0.85

Tested by

no test coverage detected