首页上一页 1 下一页尾页 1 条记录 1/1页
各行代码各是什么意思
发表在Python图书答疑
2021-01-31
《Python数据分析从入门到实践》第5章 可视化数据分析图表 186页-0页
是否精华
是
否
版块置顶:
是
否
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d.axes3d import Axes3D
import numpy as np
fig = plt.figure()
axes3d = Axes3D(fig)
zs = [1, 5, 10, 15, 20]
for z in zs:
x = np.arange(0, 10)
y = np.random.randint(0, 30, size=10)
axes3d.bar(x, y, zs=z, zdir='x', color=['r', 'green', 'yellow', 'c'])
plt.show()
from mpl_toolkits.mplot3d.axes3d import Axes3D
import numpy as np
fig = plt.figure()
axes3d = Axes3D(fig)
zs = [1, 5, 10, 15, 20]
for z in zs:
x = np.arange(0, 10)
y = np.random.randint(0, 30, size=10)
axes3d.bar(x, y, zs=z, zdir='x', color=['r', 'green', 'yellow', 'c'])
plt.show()
于2021-01-31 15:47:06编辑