Sunday 8 September 2013

Enthought - matplotlib (problems with plot() function )

Enthought - matplotlib (problems with plot() function )

Trying to use matplotlib on Canopy Express, even a simple code does not run..
NOTE: system does not recognize plot(x) function.. It seems there is
something with ASCII X Unicode. My computer uses UNICODE English(US)..
FROM CONSOLE:
""""C:\Users\dafonseca\AppData\Local\Enthought\Canopy\User\lib\site-packages\matplotlib\font_manager.py
in createFontList(fontfiles, fontext) 582 continue 583 try: --> 584 prop =
ttfFontProperty(font) 585 except KeyError: 586 continue
C:\Users\dafonseca\AppData\Local\Enthought\Canopy\User\lib\site-
packages\matplotlib\font_manager.py in ttfFontProperty(font) 396 sfnt2 =
'' 397 if sfnt4: --> 398 sfnt4 = sfnt4.decode('ascii').lower() 399 else:
400 sfnt4 = ''
UnicodeDecodeError: 'ascii' codec can't decode byte 0x82 in position 0:
ordinal not in range(128)""""
import numpy as np import matplotlib.pyplot as plt
x = np.linspace(0, 10)
line, = plt.plot(x, np.sin(x), '--', linewidth=2)
dashes = [10, 5, 100, 5] # 10 points on, 5 off, 100 on, 5 off
line.set_dashes(dashes)
plt.show()

No comments:

Post a Comment