I want to make the following bar chart, but with relative abundances on top of the chart labels. I get the absolute numbers, but not the relative abundances:
data = {{43, 14}, {193, 158}, {37, 18}, {12, 3}, {5, 1}, {4, 0}};
BarChart[data
, LabelingFunction -> (Placed[#, Above] &)
]
I get it to work if I have only one bar per category, but not with two bars per category, because I don't know how to make the division inside the LabelingFunction separate for each category:
data = {43, 193, 37, 12, 5, 4};
BarChart[data
, LabelingFunction -> (Placed[N[#/Total@data], Above] &)
]