Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6461fd9

Browse files
committed
Fix ImportError: No module named 'StringIO' on Python 3
1 parent 4c3bf8e commit 6461fd9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/misc/svg_filter_line.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
ax.set_ylim(0., 1.)
5353

5454
# save the figure as a string in the svg format.
55-
from StringIO import StringIO
56-
f = StringIO()
55+
from io import BytesIO
56+
f = BytesIO()
5757
plt.savefig(f, format="svg")
5858

5959

0 commit comments

Comments
 (0)