File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1886,14 +1886,16 @@ def _get_size_inches(self):
18861886 Return the width and height of the axes in inches.
18871887 """
18881888 width , height = self .figure .get_size_inches ()
1889- bbox = self .get_position ()
1889+ bbox = self .get_position (original = True )
18901890 width = width * abs (bbox .width )
18911891 height = height * abs (bbox .height )
1892- dpi = getattr (self .figure , "dpi" , None )
1892+ fig = self .figure
1893+ dpi = getattr (fig , "_original_dpi" , None )
1894+ if dpi is None :
1895+ dpi = getattr (fig , "dpi" , None )
18931896 if dpi :
18941897 width = round (width * dpi ) / dpi
18951898 height = round (height * dpi ) / dpi
1896- fig = self .figure
18971899 if fig is not None and getattr (fig , "_refnum" , None ) == self .number :
18981900 if getattr (fig , "_refwidth" , None ) is not None :
18991901 width = fig ._refwidth
You can’t perform that action at this time.
0 commit comments