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 5f654dc

Browse filesBrowse files
committed
Fix PDFpages bug
1 parent df1af2f commit 5f654dc
Copy full SHA for 5f654dc

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/backends/backend_pdf.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_pdf.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2591,7 +2591,8 @@ def print_pdf(self, filename, **kwargs):
25912591
bbox_inches_restore=_bbox_inches_restore)
25922592
self.figure.draw(renderer)
25932593
renderer.finalize()
2594-
file.finalize()
2594+
if not isinstance(filename, PdfPages):
2595+
file.finalize()
25952596
finally:
25962597
if isinstance(filename, PdfPages): # finish off this page
25972598
file.endStream()

0 commit comments

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