ax = inputs['Age'].plot(kind='hist', bins=10, range = (20,100), grid=True, density=True)
有没有办法从返回的每个条柱的密度中获取计算的y值?
还是我必须为每个箱子单独计算它们?
杨魅力
浏览 66回答 1
1回答
慕田峪4524236
虽然不返回箱子,但确实如此。因此,如果要获得完全相同的绘图和素材箱,则可以使用:pandas.Series.plotmatplotlib.pyplot.histbins, values, _ = ax.hist(inputs['Age'], bins=10, range = (20,100), density = True)ax.grid() # there is no grid=True option in matplotlib.pyplot.hist