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

Skip to content

Commit c9f84b6

Browse files
committed
use savefig of fig instead of plt
1 parent 41e1047 commit c9f84b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/tests/test_backend_svg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,12 @@ def test_unicode_won():
215215
matplotlib.rcParams['text.usetex'] = True
216216
matplotlib.rcParams['text.latex.unicode'] = True
217217

218-
plt.figure()
218+
fig = plt.figure()
219219
plt.plot(1, 1)
220220
plt.ylabel(r'\textwon')
221221

222222
fd = BytesIO()
223-
plt.savefig(fd, format='svg')
223+
fig.savefig(fd, format='svg')
224224
fd.seek(0)
225225
buf = fd.read().decode()
226226
fd.close()

0 commit comments

Comments
 (0)