小编Aji*_*ood的帖子

将 matplotlib 直方图除以最大 bin 值

I want to plot multiple histograms on the same plot and I need to compare the spread of the data. I want to do this by dividing each histogram by its maximum value so all the distributions have the same scale. However, the way matplotlib's histogram function works, I have not found an easy way to do this.

This is because n in

n, bins, patches = ax1.hist(y, bins = 20, histtype = 'step', color = 'k')
Run Code Online (Sandbox Code Playgroud)

Is the number …

python numpy matplotlib histogram

6
推荐指数
1
解决办法
9233
查看次数

标签 统计

histogram ×1

matplotlib ×1

numpy ×1

python ×1