Ich beschäftige mich seit kurzen mit Python 2.7.14 und wolle nun einen Graphen anzeigen lassen. Das Problem welches ich jetzt habe ist, dass wenn ich das Programm starte eine Fehlermeldung bekomme und nicht weiß wie ich das löse.
Ich hoffe ihr könnt mir mit diesem Fehler helfen.
Ich danke euch schon mal im Vorraus.
Hier mein Program
Code: Alles auswählen
import numpy as np
import matplotlib.pyplot as plt
x = np.arange(0, 5, 0.1)
y = np.sin(y)
plt.plot(y)
plt.show()
Code: Alles auswählen
Traceback (most recent call last):
File "C:/Python27/plot_test.py", line 6, in <module>
plt.plot(x,y);
File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 3229, in plot
ax = gca()
File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 959, in gca
return gcf().gca(**kwargs)
File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 588, in gcf
return figure()
File "C:\Python27\lib\site-packages\matplotlib\pyplot.py", line 534, in figure
**kwargs)
File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", line 170, in new_figure_manager
return cls.new_figure_manager_given_figure(num, fig)
File "C:\Python27\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 1049, in new_figure_manager_given_figure
window = Tk.Tk(className="matplotlib")
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1824, in __init__
self.readprofile(baseName, className)
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1876, in readprofile
class_tcl = os.path.join(home, '.%s.tcl' % className)
File "C:\Python27\lib\ntpath.py", line 85, in join
result_path = result_path + p_path
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf6 in position 17: ordinal not in range(128)