【发布时间】:2014-04-06 18:24:44
【问题描述】:
我想在我的直方图上有第二个轴,与每个 bin 对应的 pourcentage,就像我使用 normed=True 一样。我尝试使用双胞胎,但比例不正确。
x = np.random.randn(10000)
plt.hist(x)
ax2 = plt.twinx()
plt.show()
如果你可以让它与 log scaled x 一起工作,那么奖励点 :)
【问题讨论】:
标签: python matplotlib histogram