| 86 | |
| 87 | |
| 88 | class 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 | |
| 117 | class BboxConnector(Patch): |
no outgoing calls
no test coverage detected
searching dependent graphs…