Sorry if this is a noob question, but I have never used pandas or seaborn before. I am trying to make a bar chart with stacked bars using the following;
'''
graph = seaborn.catplot(
data=data, kind="bar",
x="year", y="count", hue="name", height=20, palette=customPalette,
dodge = False
)
'''
However, not all of the results are visible, as some bars overlap and hide other bars. Viewing this with dodge = True clearly shows which bars overlap. How to I change the order of the bars for stacking?
The data looks like this:
name decade count
Anne 1920 70,000
Amy 1920 60,000
Ava 1920 50,000
Bill 1930 65,000
Bo 1930 55,000
And so on ...
When I run the code I want a bar chart, with each bar representing a different decade, and the bar split up to show the count of each name in that decade. However, looking at the bar produced for 1920, only Anne and Amy are visible, and the Ava bar is covered by the Amy bar. If I change dodge = False to True, I can see that the bars are ordered this way. How can I change the bars so they are ordered by size for visibility when stacking? I hope that makes sense.