from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np
fig,ax=plt.subplots()
ax=fig.add_subplot(111, projection='3d')
for c, z in zip(['c',], [30]):
xs = np.arange(10)
for i in range(10000):
#print(xs)
ys = np.random.rand(10)
#print(ys)
ax.cla()
cs = [c]*len(xs)
ax.bar(xs, ys, zs=z, zdir='y', color='c', alpha=1)
#隐藏网格
ax.grid(False)
#隐藏三维坐标轴
ax.axis('off')
plt.pause(0.05)
plt.xticks([])
plt.yticks([])
plt.show()
【python】一个3D版的音频跳动的效果
最新推荐文章于 2024-08-27 07:54:16 发布