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 ea136ce

Browse filesBrowse files
committed
Fix save button in GUIs
1 parent 4fd5f55 commit ea136ce
Copy full SHA for ea136ce

File tree

Expand file treeCollapse file tree

2 files changed

+4
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-0
lines changed

‎lib/matplotlib/animation.py

Copy file name to clipboardExpand all lines: lib/matplotlib/animation.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,8 @@ def save(self, filename, writer=None, fps=None, dpi=None, codec=None,
732732
# Re-use the savefig DPI for ours if none is given
733733
if dpi is None:
734734
dpi = rcParams['savefig.dpi']
735+
if dpi == 'figure':
736+
dpi = self._fig.dpi
735737

736738
if codec is None:
737739
codec = rcParams['animation.codec']

‎lib/matplotlib/backend_bases.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backend_bases.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2141,6 +2141,8 @@ def print_figure(self, filename, dpi=None, facecolor='w', edgecolor='w',
21412141

21422142
if dpi is None:
21432143
dpi = rcParams['savefig.dpi']
2144+
if dpi == 'figure':
2145+
dpi = self.figure.dpi
21442146

21452147
origDPI = self.figure.dpi
21462148
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.