0

I tried this code. I cannot understand what does it mean by it's strange error ValueError: shape mismatch: objects cannot be broadcast to a single shape

from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.dates as dt

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
lstDT=['2017-01-01T09:00:00.000','2017-01-01T09:00:01.000','2017-01-01T09:00:02.000','2017-01-01T09:00:03.000','2017-01-01T09:00:04.000', '2017-01-01T09:00:05.000','2017-01-01T09:00:06.000', '2017-01-01T09:00:07.000','2017-01-01T09:00:08.000', '2017-01-01T09:00:09.000','2017-01-01T09:00:10.000']
lstDT = np.asarray(lstDT, dtype='datetime64[ms]')
lstDT1 = dt.date2num(list(lstDT))
X=np.array(lstDT)
# Y=np.array([1,2,3,4,5,6,7,8,9,10])
Y = [65.2, 65.2, 65.2, 65.2, 65.2, 65.2, 65.2, 65.2, 65.2, 65.2, 65.2]
Y = np.array(Y)
Z=np.array([[1,1,1,1,1,1,1,1,1,1]])
ax.plot_wireframe(X,Y,Z)

plt.show()

If anyone has tried some other way like polygon collection that's also welcome.

8

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.