示例 CSV 数据(总实例 72):
10 90 27.62346
10 80 30.13889
10 70 30.97222
10 60 25.15432
10 50 31.38889
10 40 30.8642
10 30 31.41975
10 20 31.32716
20 90 26.85185
30 80 28.16667
20 70 29.48148
20 60 26.54321
20 50 29.51389
20 40 29.51389
20 30 26.85185
20 20 31.6358
...............
代码:
x, y, z = zip(*data)
fig = plt.figure()
ax = plt.axes(projection='3d')
ax.set_xlabel('CPU(%)')
ax.set_ylabel('Memory(%)')
ax.set_zlabel('Rate(%)')
ax.set_zlim(10,100)
ax.plot_trisurf(np.array(x),np.array(y),np.array(z),cmap='viridis', edgecolor='none')