ax1.set_axis_off()
ax.set(xlabel='time (s)', ylabel='voltage (mV)',
title='About as simple as it gets, folks')
def show_press_map(stand_data, fig=plt.figure()):
Xi = np.arange(0, 40, step=1) # X轴的坐标
Yj = np.arange(0, 40, step=1) # Y轴的坐标
xx, yy = np.meshgrid(Xi, Yj) # 网格化坐标
ax = fig.gca(projection='3d') # 三维坐标轴
ax.set_zlim3d(-30, 200)
data = MyData.get_press_map(stand_data[-512:])
print('data: ', data[25, 4:20])
print(type(xx), type(yy), type(data))
surf = ax.plot_surface(xx, yy, data,
rstride=1, # rstride(row)指定行的跨度
cstride=1, # cstride(column)指定列的跨度
cmap=plt.get_cmap('rainbow')) # 设置颜色映射
fig.colorbar(surf, shrink=0.5, aspect=5)
ax.view_init(elev=41., azim=108)
return data
plt.draw()
plt.pause(0.01)
plt.clf()
因篇幅问题不能全部显示,请点此查看更多更全内容