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 e951bd6

Browse filesBrowse files
committed
Fix ImportError: No module named 'StringIO' on Python 3
1 parent 02c1c3a commit e951bd6
Copy full SHA for e951bd6

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+2
-2
lines changed

‎examples/user_interfaces/svg_tooltip.py

Copy file name to clipboardExpand all lines: examples/user_interfaces/svg_tooltip.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
import matplotlib.pyplot as plt
2626
import xml.etree.ElementTree as ET
27-
from StringIO import StringIO
27+
from io import BytesIO
2828

2929
ET.register_namespace("", "http://www.w3.org/2000/svg")
3030

@@ -72,7 +72,7 @@
7272
ax.set_ylim(-30, 30)
7373
ax.set_aspect('equal')
7474

75-
f = StringIO()
75+
f = BytesIO()
7676
plt.savefig(f, format="svg")
7777

7878
# --- Add interactivity ---

0 commit comments

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