Connect two bboxes with a straight line. Parameters ---------- bbox1, bbox2 : `~matplotlib.transforms.Bbox` Bounding boxes to connect. loc1, loc2 : {1, 2, 3, 4} Corner of *bbox1* and *bbox2* to draw the line. Valid values are::
(self, bbox1, bbox2, loc1, loc2=None, **kwargs)
| 150 | |
| 151 | @_docstring.interpd |
| 152 | def __init__(self, bbox1, bbox2, loc1, loc2=None, **kwargs): |
| 153 | """ |
| 154 | Connect two bboxes with a straight line. |
| 155 | |
| 156 | Parameters |
| 157 | ---------- |
| 158 | bbox1, bbox2 : `~matplotlib.transforms.Bbox` |
| 159 | Bounding boxes to connect. |
| 160 | |
| 161 | loc1, loc2 : {1, 2, 3, 4} |
| 162 | Corner of *bbox1* and *bbox2* to draw the line. Valid values are:: |
| 163 | |
| 164 | 'upper right' : 1, |
| 165 | 'upper left' : 2, |
| 166 | 'lower left' : 3, |
| 167 | 'lower right' : 4 |
| 168 | |
| 169 | *loc2* is optional and defaults to *loc1*. |
| 170 | |
| 171 | **kwargs |
| 172 | Patch properties for the line drawn. Valid arguments include: |
| 173 | |
| 174 | %(Patch:kwdoc)s |
| 175 | """ |
| 176 | if "transform" in kwargs: |
| 177 | raise ValueError("transform should not be set") |
| 178 | |
| 179 | kwargs["transform"] = IdentityTransform() |
| 180 | kwargs.setdefault( |
| 181 | "fill", bool({'fc', 'facecolor', 'color'}.intersection(kwargs))) |
| 182 | super().__init__(**kwargs) |
| 183 | self.bbox1 = bbox1 |
| 184 | self.bbox2 = bbox2 |
| 185 | self.loc1 = loc1 |
| 186 | self.loc2 = loc2 |
| 187 | |
| 188 | def get_path(self): |
| 189 | # docstring inherited |
nothing calls this directly
no test coverage detected