Skip to content
Advertisement

matplotlib histogram: how to display the count over the bar?

With matplotlib’s hist function, how can one make it display the count for each bin over the bar?

For example,

JavaScript

How can we make the count in each bin display over its bar?

Advertisement

Answer

it seems hist can’t do this,you can write some like :

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement