0
Ich versuche, eine 3D-Oberfläche mit Koordinaten von x, y und Werten als w1 zu plotten. Ich habe die Abmessungen nach shape() überprüft, sie passen zusammen. aber ich erhalte den Fehler, dass "Attribut: 'Modul' Objekt hat kein Attribut 'plot_surface'"Python: AttributeError beim Zeichnen einer 3D-Oberfläche
Code:
import numpy as np
import math
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
. . .
x = np.arange(xmin, xmax+dx, dx)
z = np.arange(zmin, zmax+dz, dz)
X, Z = np.meshgrid(x, z)
#print X.shape, Z.shape, w1.shape
plt.plot_surface(X, Z, w1)
plt.show()
w1 zuvor definiert ist, und ist ein Array von Werten mit derselben Dimension wie X, Z ... Ich habe durch Form() – Soyol