ich habe folgende Frage, bisher habe ich Graustufenbilder auf folgende Art und Weise erstellt.
import matplotlib.pyplot as plt
import matplotlib
import numpy as np
import random
from mpl_toolkits.mplot3d import Axes3D
A=30
B=30
img= np.random.randint(1,100, (A,B))
print(img)
plt.imshow(img)
plt.show()
Nun möchte ich img um eine dritte Dimension erweitern und die ebenso darstellen, leider klappt es so nicht
A=30
B=30
C=30
img= np.random.randint(1,100, (A,B,C))
plt.imshow(img)
plt.show()
Weiß jemand wie ich die Matrix als 3D Bild darstellen kann?
Vielen Dank im Voraus
