我想用Matplotlib制作3D图形。出现图形窗口,但不显示任何数据。我做错了什么?
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
x = [0, 10, 20, 40, 100]
y = [1, 4, 8, 60, 200]
z = [4, 5, 6, 7, 8]
ax.plot_surface(x, y, z)
plt.show()