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

Method anchored

lib/matplotlib/transforms.py:503–525  ·  view source on GitHub ↗

Return a copy of the `Bbox` anchored to *c* within *container*. Parameters ---------- c : (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...} Either an (*x*, *y*) pair of relative coordinates (0 is left or bottom, 1 is right or top), 'C'

(self, c, container)

Source from the content-addressed store, hash-verified

501 'W': (0, 0.5)}
502
503 def anchored(self, c, container):
504 """
505 Return a copy of the `Bbox` anchored to *c* within *container*.
506
507 Parameters
508 ----------
509 c : (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}
510 Either an (*x*, *y*) pair of relative coordinates (0 is left or
511 bottom, 1 is right or top), 'C' (center), or a cardinal direction
512 ('SW', southwest, is bottom left, etc.).
513 container : `Bbox`
514 The box within which the `Bbox` is positioned.
515
516 See Also
517 --------
518 .Axes.set_anchor
519 """
520 l, b, w, h = container.bounds
521 L, B, W, H = self.bounds
522 cx, cy = self.coefs[c] if isinstance(c, str) else c
523 return Bbox(self._points +
524 [(l + cx * (w - W)) - L,
525 (b + cy * (h - H)) - B])
526
527 def shrunk(self, mx, my):
528 """

Callers 7

apply_aspectMethod · 0.80
_locateMethod · 0.80
_locateFunction · 0.80
reposition_colorbarFunction · 0.80
make_axesFunction · 0.80
_get_anchored_bboxFunction · 0.80
apply_aspectMethod · 0.80

Calls 1

BboxClass · 0.85

Tested by

no test coverage detected