Seite 1 von 1

3d-Plot

Verfasst: Montag 29. Oktober 2012, 21:16
von 01detlef
Hallo zusammen,

ich habe eine kleine Frage zur Plot-Funktion. Ich habe eine Matrix points_def:
x1,y1,z1
x2,y2,z2
usw.
und möchte die nun darstellen mit einem wireframe. Es wird kein Fehler angezeigt, aber eine Grafik kommt auch nicht. Wo kann der Fehler sein?

Code: Alles auswählen

points_def = point_def(fe_de)
fig = plot.figure()
ax=fig.gca(projection='3d')
ax.plot_wireframe(points_def[:,0],points_def[:,1],points_def[:,2],rstride=5,cstride=5)
plt.show()
detlef

Re: 3d-Plot

Verfasst: Dienstag 30. Oktober 2012, 11:34
von schaeffkoch
hallo,

mir scheint da fehlen auch ein paar importe:

Code: Alles auswählen

from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
dann vielleicht

Code: Alles auswählen

fig = plt.figure()


statt

Code: Alles auswählen

fig = plot.figure()
gucksdu http://matplotlib.org/mpl_toolkits/mplo ... rame-plots