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 71691d3

Browse filesBrowse files
committed
Merge pull request #2404 from mdboom/ps-backend-encoding
Fix backend_ps.py
2 parents 9310a2b + d7f3190 commit 71691d3
Copy full SHA for 71691d3

File tree

1 file changed

+4
-1
lines changed
Filter options

1 file changed

+4
-1
lines changed

‎lib/matplotlib/backends/backend_ps.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_ps.py
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,10 @@ def print_figure_impl():
11651165
print("%s clipbox"%_nums_to_str(width*72, height*72, 0, 0), file=fh)
11661166

11671167
# write the figure
1168-
print(self._pswriter.getvalue(), file=fh)
1168+
content = self._pswriter.getvalue()
1169+
if not isinstance(content, six.text_type):
1170+
content = content.decode('ascii')
1171+
print(content, file=fh)
11691172

11701173
# write the trailer
11711174
#print >>fh, "grestore"

0 commit comments

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