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 9fe5abe

Browse filesBrowse files
committed
Merge pull request #5788 from cgohlke/patch-1
Fix svg examples in python 3
1 parent 5e59222 commit 9fe5abe
Copy full SHA for 9fe5abe

File tree

Expand file treeCollapse file tree

4 files changed

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

4 files changed

+4
-4
lines changed

‎examples/misc/svg_filter_line.py

Copy file name to clipboardExpand all lines: examples/misc/svg_filter_line.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
ax.set_ylim(0., 1.)
5353

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

‎examples/misc/svg_filter_pie.py

Copy file name to clipboardExpand all lines: examples/misc/svg_filter_pie.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343

4444
# save
45-
from StringIO import StringIO
45+
from io import StringIO
4646
f = StringIO()
4747
plt.savefig(f, format="svg")
4848

‎examples/user_interfaces/svg_histogram.py

Copy file name to clipboardExpand all lines: examples/user_interfaces/svg_histogram.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
import numpy as np
3636
import matplotlib.pyplot as plt
3737
import xml.etree.ElementTree as ET
38-
from StringIO import StringIO
38+
from io import StringIO
3939
import json
4040

4141
plt.rcParams['svg.embed_char_paths'] = 'none'

‎examples/user_interfaces/svg_tooltip.py

Copy file name to clipboardExpand all lines: examples/user_interfaces/svg_tooltip.py
+1-1Lines changed: 1 addition & 1 deletion
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 StringIO
2828

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

0 commit comments

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