@@ -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
@@ -341,28 +340,40 @@ def get_window_extent(self, renderer=None):
341
340
screen render incorrectly when saved to file.
342
341
343
342
To get accurate results you may need to manually call
344
- `matplotlib.figure.Figure.savefig` or
345
- `matplotlib.figure.Figure.draw_without_rendering` to have Matplotlib
346
- compute the rendered size.
343
+ `~.Figure.savefig` or `~.Figure.draw_without_rendering` to have
344
+ Matplotlib compute the rendered size.
347
345
346
+ Parameters
347
+ ----------
348
+ renderer : `~matplotlib.backend_bases.RendererBase`, optional
349
+ Renderer used to draw the figure (i.e. ``fig.canvas.get_renderer()``).
350
+
351
+ See Also
352
+ --------
353
+ `~.Artist.get_tightbbox` :
354
+ 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
- The enclosing bounding box (in figure pixel coordinates).
365
- Returns None if clipping results in no intersection.
370
+ The enclosing bounding box (in figure pixel coordinates), or None
371
+ if clipping results in no intersection.
372
+
373
+ See Also
374
+ --------
375
+ `~.Artist.get_window_extent` :
376
+ Get the artist bounding box, ignoring clipping.
366
377
"""
367
378
bbox = self .get_window_extent (renderer )
368
379
if self .get_clip_on ():
0 commit comments