Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06b97a8 commit db30cbeCopy full SHA for db30cbe
1 file changed
lib/matplotlib/figure.py
@@ -3003,7 +3003,12 @@ def _set_base_canvas(self):
3003
This is used upon initialization of the Figure, but also
3004
to reset the canvas when decoupling from pyplot.
3005
"""
3006
+ # check if we have changed the API due to hi-dpi screens
3007
+ orig_dpi = getattr(self, '_original_dpi', self._dpi)
3008
FigureCanvasBase(self) # Set self.canvas as a side-effect
3009
+ # put it back to what it was
3010
+ if orig_dpi != self._dpi:
3011
+ self.dpi = orig_dpi
3012
3013
def set_canvas(self, canvas):
3014
0 commit comments