Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d494c31

Browse files
tacaswelltimhoffm
andauthored
DOC: clarify wording
Co-authored-by: Tim Hoffmann <[email protected]>
1 parent 8865ece commit d494c31

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/matplotlib/artist.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -337,15 +337,14 @@ def get_window_extent(self, renderer=None):
337337
338338
.. warning::
339339
340-
Be careful when using this function, the results will not update if
341-
the artist window extent of the artist changes.
342-
343340
The extent can change due to any changes in the transform stack, such
344341
as changing the Axes limits, the figure size, the canvas used (as is
345342
done when saving a figure), or the DPI.
346343
347-
This can lead to unexpected behavior where interactive figures will
348-
look fine on the screen, but will save incorrectly.
344+
Relying on a once-retrieved window extent can lead to unexpected
345+
behavior in various cases such as interactive figures being resized or
346+
moved to a screen with different dpi, or figures that look fine on
347+
screen render incorrectly when saved to file.
349348
350349
To get accurate results you may need to manually call
351350
`matplotlib.figure.Figure.savefig` or

0 commit comments

Comments
 (0)