@@ -321,13 +321,12 @@ def stale(self, val):
321
321
322
322
def get_window_extent (self , renderer = None ):
323
323
"""
324
- Get the artist's bounding box in display space.
324
+ Get the artist's bounding box in display space, ignoring clipping .
325
325
326
326
The bounding box's width and height are non-negative.
327
327
328
- Subclasses should override for inclusion in the bounding box
329
- "tight" calculation. Default is to return an empty bounding
330
- box at 0, 0.
328
+ Subclasses should override for inclusion in the bounding box "tight"
329
+ calculation. Default is to return an empty bounding box at 0, 0.
331
330
332
331
.. warning::
333
332
@@ -345,24 +344,35 @@ def get_window_extent(self, renderer=None):
345
344
`matplotlib.figure.Figure.draw_without_rendering` to have Matplotlib
346
345
compute the rendered size.
347
346
347
+ Parameters
348
+ ----------
349
+ renderer : `~matplotlib.backend_bases.RendererBase`, optional
350
+ Renderer used to draw the figure (i.e. ``fig.canvas.get_renderer()``).
351
+
352
+ See Also
353
+ --------
354
+ get_tightbbox : Get the artist bounding box, taking clipping into account.
348
355
"""
349
356
return Bbox ([[0 , 0 ], [0 , 0 ]])
350
357
351
358
def get_tightbbox (self , renderer = None ):
352
359
"""
353
- Like `.Artist.get_window_extent`, but includes any clipping.
360
+ Get the artist's bounding box in display space, taking clipping into account .
354
361
355
362
Parameters
356
363
----------
357
- renderer : `~matplotlib.backend_bases.RendererBase` subclass, optional
358
- renderer that will be used to draw the figures (i.e.
359
- ``fig.canvas.get_renderer()``)
364
+ renderer : `~matplotlib.backend_bases.RendererBase`, optional
365
+ Renderer used to draw the figure (i.e. ``fig.canvas.get_renderer()``).
360
366
361
367
Returns
362
368
-------
363
369
`.Bbox` or None
364
370
The enclosing bounding box (in figure pixel coordinates).
365
371
Returns None if clipping results in no intersection.
372
+
373
+ See Also
374
+ --------
375
+ get_window_extent : Get the artist bounding box, ignoring clipping.
366
376
"""
367
377
bbox = self .get_window_extent (renderer )
368
378
if self .get_clip_on ():
0 commit comments