plt.figure(figsize=(50, 30))
Comparison.plot(x='Country', kind='bar', stacked=True,title='Stacked Bar Graph by dataframe')
Asked
Active
Viewed 142 times
-1

Henry Ecker
- 34,399
- 18
- 41
- 57
1 Answers
0
Without knowing the original dataset, I suggest manually ordering the Comparison
dataframe, e.g.:
Comparison.sort_index(ascending=True, ignore_index=True, inplace=True)
Comparison.plot(x='Country', kind='bar', stacked=True, title='Stacked Bar Graph by dataframe')
For other approaches see this post.

czeni
- 427
- 2
- 11
-
Thanks for replying but it didnt work . Its still showing in Descending order . – priya singh Jul 31 '21 at 03:32
-
What is the original dataset? It can be halepful I we know what is exactly the dataframe index, the type of it. – czeni Jul 31 '21 at 13:17