Get the artist's bounding box in display space, taking clipping into account. Parameters ---------- renderer : `~matplotlib.backend_bases.RendererBase`, optional Renderer used to draw the figure (i.e. ``fig.canvas.get_renderer()``). Returns
(self, renderer=None)
| 371 | return Bbox([[0, 0], [0, 0]]) |
| 372 | |
| 373 | def get_tightbbox(self, renderer=None): |
| 374 | """ |
| 375 | Get the artist's bounding box in display space, taking clipping into account. |
| 376 | |
| 377 | Parameters |
| 378 | ---------- |
| 379 | renderer : `~matplotlib.backend_bases.RendererBase`, optional |
| 380 | Renderer used to draw the figure (i.e. ``fig.canvas.get_renderer()``). |
| 381 | |
| 382 | Returns |
| 383 | ------- |
| 384 | `.Bbox` or None |
| 385 | The enclosing bounding box (in figure pixel coordinates), or None |
| 386 | if clipping results in no intersection. |
| 387 | |
| 388 | See Also |
| 389 | -------- |
| 390 | .Artist.get_window_extent : |
| 391 | Get the artist bounding box, ignoring clipping. |
| 392 | """ |
| 393 | bbox = self.get_window_extent(renderer) |
| 394 | if self.get_clip_on(): |
| 395 | clip_box = self.get_clip_box() |
| 396 | if clip_box is not None: |
| 397 | bbox = Bbox.intersection(bbox, clip_box) |
| 398 | clip_path = self.get_clip_path() |
| 399 | if clip_path is not None and bbox is not None: |
| 400 | clip_path = clip_path.get_fully_transformed_path() |
| 401 | bbox = Bbox.intersection(bbox, clip_path.get_extents()) |
| 402 | return bbox |
| 403 | |
| 404 | def add_callback(self, func): |
| 405 | """ |
no test coverage detected