【发布时间】:2022-01-21 17:35:03
【问题描述】:
我正在尝试在我的直方图顶部添加数据标签值以尝试显示频率。
这是我现在的代码,但不确定如何编写代码以将值放在顶部:
plt.figure(figsize=(15,10))
plt.hist(df['Age'], edgecolor='white', label='d')
plt.xlabel("Age")
plt.ylabel("Number of Patients")
plt.title = ('Age Distrubtion')
我想知道是否有人知道执行此操作的代码:
【问题讨论】:
标签: python matplotlib annotations bar-chart histogram