I would to know if there is the possibility to plot in four dimensions using python. In particular I would to have a tridimensional mesh X, Y, Z and f(X,Y,Z) = 1 or f(X,Y,Z) = 0. So I need to a symbol (for example "o" or "x") for some specific point (X,Y,Z). I don't need to a color scale.
Note that I have 100 matrices (512*512) composed by 1 or 0: so my mesh should be 512*512*100.
I hope I have been clear! Thanks.
EDIT: This is my code:
X = np.arange(W.shape[2])
Y = np.arange(W.shape[1])
Z = np.arange(W.shape[0])
X, Y, Z = np.meshgrid(X, Y, Z)
fig = plt.figure()
ax = fig.gca(projection='3d')
for z in range(W.shape[0]):
indexes = np.where(W[z])
ax.scatter(X[indexes], Y[indexes], ???, marker='.')
ax.set_xlabel('X = columns')
ax.set_ylabel('Y = rows')
ax.set_zlabel('Z')
plt.show()
W is my tridimensional matrix, so: W[0], W[1], etc are 512x512 matrices. My question is: what have I to write insted of ??? in my code. I know I shouldn't ask this, but I can't understand the idea.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire