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

Appearance settings

Commit 278e8ef

Browse filesBrowse files
committed
FIX: fix up savefig dpi if scaled for screen
If `_original_dpi` is tacked on to the figure instance by a backend canvas use that for 'figure' dpi instead of the dpi scaled for the screen.
1 parent 533f0bb commit 278e8ef
Copy full SHA for 278e8ef

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎lib/matplotlib/backend_bases.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backend_bases.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2157,7 +2157,7 @@ def print_figure(self, filename, dpi=None, facecolor=None, edgecolor=None,
21572157
dpi = rcParams['savefig.dpi']
21582158

21592159
if dpi == 'figure':
2160-
dpi = self.figure.dpi
2160+
dpi = getattr(self.figure, '_original_dpi', self.figure.dpi)
21612161

21622162
if facecolor is None:
21632163
facecolor = rcParams['savefig.facecolor']

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.