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

Class BboxPatch

lib/mpl_toolkits/axes_grid1/inset_locator.py:88–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86
87
88class BboxPatch(Patch):
89 @_docstring.interpd
90 def __init__(self, bbox, **kwargs):
91 """
92 Patch showing the shape bounded by a Bbox.
93
94 Parameters
95 ----------
96 bbox : `~matplotlib.transforms.Bbox`
97 Bbox to use for the extents of this patch.
98
99 **kwargs
100 Patch properties. Valid arguments include:
101
102 %(Patch:kwdoc)s
103 """
104 if "transform" in kwargs:
105 raise ValueError("transform should not be set")
106
107 kwargs["transform"] = IdentityTransform()
108 super().__init__(**kwargs)
109 self.bbox = bbox
110
111 def get_path(self):
112 # docstring inherited
113 x0, y0, x1, y1 = self.bbox.extents
114 return Path._create_closed([(x0, y0), (x1, y0), (x1, y1), (x0, y1)])
115
116
117class BboxConnector(Patch):

Callers 2

connect_bboxFunction · 0.90
mark_insetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…