Here’s my current code Currently, it shows only the percentage (using autopct) I’d like to present both the percentage and the actual value (I don’t mind about the position) How to do it? Thanks Answer Create your own formatting function. Note that you have to recalculate the actual value from the percentage in that function somehow
Tag: plot-annotations
Seaborn Catplot set values over the bars
I plotted a catplot in seaborn like this I am getting an output like shown below 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.
How to display percentage above grouped bar chart
The following are the pandas dataframe and the bar chart generated from it: I need to display the percentages of each interest category for the respective subject above their corresponding bar. I can create a list with the percentages, but I don’t understand how to add it on top of the corresponding bar. Answer Try adding the following for loop