8000 Merge pull request #5788 from cgohlke/patch-1 · matplotlib/matplotlib@cf38ed7 · GitHub
[go: up one dir, main page]

Skip to content

Commit cf38ed7

Browse files
committed
Merge pull request #5788 from cgohlke/patch-1
Fix svg examples in python 3
2 parents e035cf9 + 4d78ae6 commit cf38ed7

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

examples/misc/svg_filter_line.py

Lines 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

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

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'
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