在水平条形图的末尾添加值

时间:2017-03-31 04:43:28

标签: python python-3.x pandas matplotlib

我正在尝试在我的水平条形图的末尾注释值:

UK.groupby(['College/University']).size().sort_values(ascending=True).plot(kind='barh',figsize=(8,8),title='UK Uni')

如果这有帮助: y=list(UK.groupby(['College/University']).size()) 回报 [2, 1, 5, 2, 6, 1, 13, 1, 4, 1, 1, 1, 11, 1, 1, 2, 12]

有什么想法吗? :)

enter image description here

1 个答案:

答案 0 :(得分:2)

使用可以使用matplotlib' s annotation functionality

public static IEnumerable<T> GetValues<T>()

enter image description here

相关问题