Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5c90416

Browse files
committed
FIX: correctly restore the size of unpickled figures with hi-dpi
The issue is that we reset the dpi but did not re-compute any of thebounding boxes derived from the dpi leading to the initial redraw eventsto use the wrong physical size on the screen.Closes#27224
1 parentc0041fb commit5c90416

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎lib/matplotlib/figure.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3321,8 +3321,9 @@ def __setstate__(self, state):
33213321
self.__dict__=state
33223322

33233323
# re-initialise some of the unstored state information
3324-
FigureCanvasBase(self)# Set self.canvas.
3325-
3324+
self._set_base_canvas()
3325+
# force the bounding boxes to respect current dpi
3326+
self.dpi_scale_trans.clear().scale(self._dpi)
33263327
ifrestore_to_pylab:
33273328
# lazy import to avoid circularity
33283329
importmatplotlib.pyplotasplt

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp