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 f6329f8

Browse filesBrowse files
author
Patrick Chen
committed
Added native dpi option for print_figure
1 parent 9348a46 commit f6329f8
Copy full SHA for f6329f8

File tree

Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Open diff view settings
Collapse file

‎lib/matplotlib/backend_bases.py‎

Copy file name to clipboardExpand all lines: lib/matplotlib/backend_bases.py
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2084,6 +2084,7 @@ def print_figure(self, filename, dpi=None, facecolor='w', edgecolor='w',
20842084
20852085
*dpi*
20862086
the dots per inch to save the figure in; if None, use savefig.dpi
2087+
if 'native' use dpi from figure
20872088
20882089
*facecolor*
20892090
the facecolor of the figure
@@ -2127,6 +2128,8 @@ def print_figure(self, filename, dpi=None, facecolor='w', edgecolor='w',
21272128

21282129
if dpi is None:
21292130
dpi = rcParams['savefig.dpi']
2131+
elif dpi == 'native':
2132+
dpi = self.figure.dpi
21302133

21312134
origDPI = self.figure.dpi
21322135
origfacecolor = self.figure.get_facecolor()

0 commit comments

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