Skip to content
Advertisement

Seaborn Catplot set values over the bars

I plotted a catplot in seaborn like this

JavaScript

I am getting an output like shown below

enter image description here

I want to add the values of each bar on its top in K representation. For example in 2013 the bar for Michigan is at 48411 so I want to add the value 48.4K on top of that bar. Likewise for all the bars.

Advertisement

Answer

Updated as of matplotlib v3.4.2

For single plot only

JavaScript

enter image description here

For single or multiple plots

JavaScript

enter image description here

Advertisement