matplotlib
Verfasst: Dienstag 23. August 2016, 16:36
				
				Hallo:)
ich bin gerade dabei mit matplotlib grafiken zu erstellen und bin dabei leider an einer stelle auf eine fehlermeldung gestoßen:
Auf den Eintrag:
axis1.xlim(-pi,pi)
folgt nur ein error:
AttributeError: 'list' object has no attribute 'xlim'
Und jetzt einen größeren eintrag von dem was ich geschrieben habe, damit man das auch in einen Kontext bringen kann:
from numpy import linspace, pi, cos
import matplotlib.pylab as plt
x = linspace (-pi,pi,100)
c = cos(x)
f1 = plt.figure(figsize=(8,6), dpi = 80)
axes1 = f1.add_subplot (1,1,1)
axis1 = axes1.plot(x,c,'-or')
axis1.xlim(-pi,pi)
axis1.xlabel('x-Werte')
f1.show()
ab dem: axis1.xlim(-pi,pi) komme ich nicht weiter und auch die nächste zeile bringt nur ne Fehlermeldung der selben art.
Was mache ich falsch?
Danke:)
			ich bin gerade dabei mit matplotlib grafiken zu erstellen und bin dabei leider an einer stelle auf eine fehlermeldung gestoßen:
Auf den Eintrag:
axis1.xlim(-pi,pi)
folgt nur ein error:
AttributeError: 'list' object has no attribute 'xlim'
Und jetzt einen größeren eintrag von dem was ich geschrieben habe, damit man das auch in einen Kontext bringen kann:
from numpy import linspace, pi, cos
import matplotlib.pylab as plt
x = linspace (-pi,pi,100)
c = cos(x)
f1 = plt.figure(figsize=(8,6), dpi = 80)
axes1 = f1.add_subplot (1,1,1)
axis1 = axes1.plot(x,c,'-or')
axis1.xlim(-pi,pi)
axis1.xlabel('x-Werte')
f1.show()
ab dem: axis1.xlim(-pi,pi) komme ich nicht weiter und auch die nächste zeile bringt nur ne Fehlermeldung der selben art.
Was mache ich falsch?
Danke:)

