-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Labels
Description
I'm study matplotlib on win7 32-bit, matplotlib1.5.3, python3.5
when i run some sample code:
%matplotlib inline
import matplotlib
import matplotlib.pylab as plt
import numpy
from IPython.display import Image, SVG
fig, ax = plt.subplots()
t = numpy.linspace(0, 10, 100)
ax.plot(t, numpy.cos(t)*numpy.sin(t))
plt.savefig("test.svg", format="svg");
SVG(filename="test.svg")in jupyter notebook.
I get error:
---------------------------------------------------------------------------
UnicodeDecodeError Traceback (most recent call last)
<ipython-input-1-6ba7bf4bed8f> in <module>()
15 plt.savefig("test.svg", format="svg");
16
---> 17 SVG(filename="test.svg")
D:\Program Files\Anaconda3\lib\site-packages\IPython\core\display.py in __init__(self, data, url, filename)
392 self.filename = None if filename is None else unicode_type(filename)
393
--> 394 self.reload()
395 self._check_data()
396
D:\Program Files\Anaconda3\lib\site-packages\IPython\core\display.py in reload(self)
411 if self.filename is not None:
412 with open(self.filename, self._read_flags) as f:
--> 413 self.data = f.read()
414 elif self.url is not None:
415 try:
UnicodeDecodeError: 'gbk' codec can't decode byte 0x92 in position 13125: illegal multibyte sequenceI read some issuses about UnicodeDecodeError but can't solve it,can anyone help me?
[TAC edited to add markup]
Reactions are currently unavailable