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 8c10735

Browse filesBrowse files
committed
Fix svg writer for StringIO objects
1 parent 797d499 commit 8c10735
Copy full SHA for 8c10735

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+2
-0
lines changed

‎lib/matplotlib/backends/backend_svg.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_svg.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,8 @@ def print_svg(self, filename, *args, **kwargs):
10951095
svgwriter = io.TextIOWrapper(filename, 'utf-8')
10961096
else:
10971097
svgwriter = codecs.getwriter('utf-8')(filename)
1098+
else:
1099+
svgwriter = filename
10981100
fh_to_close = None
10991101
else:
11001102
raise ValueError("filename must be a path or a file-like object")

0 commit comments

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