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 644b4b2

Browse filesBrowse files
committed
PRF: prevent possible over draws
Set the `_is_saving` flag as early as possible in `print_figure` to prevent aggressive auto-drawing during the same process.
1 parent 77e815e commit 644b4b2
Copy full SHA for 644b4b2

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎lib/matplotlib/backend_bases.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backend_bases.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2123,6 +2123,8 @@ def print_figure(self, filename, dpi=None, facecolor='w', edgecolor='w',
21232123
tight bbox is calculated.
21242124
21252125
"""
2126+
self._is_saving = True
2127+
21262128
if format is None:
21272129
# get format from filename, or from backend's default filetype
21282130
if cbook.is_string_like(filename):
@@ -2216,7 +2218,6 @@ def print_figure(self, filename, dpi=None, facecolor='w', edgecolor='w',
22162218
else:
22172219
_bbox_inches_restore = None
22182220

2219-
self._is_saving = True
22202221
try:
22212222
#result = getattr(self, method_name)(
22222223
result = print_method(

0 commit comments

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