Below sample data is not the exact data which I am using, it is just a data with random values.
Sample data:
Region | x | y |
---|---|---|
India | 25 | 12 |
Australia | 18 | 05 |
USA | 77 | 56 |
Ghana | 28 | 13 |
France | 35 | 41 |
UK | 50 | 72 |
Germany | 44 | 12 |
Spain | 10 | 16 |
Russia | 09 | 91 |
I want to create a bar plot comparing x and y columns of each region. And bar for x and y should be displayed side by side.
Code I used
plt.bar('Region', 'State_Fund_Accrual2016', data = df, color = 'green', label = "State fund Planned", alpha = 0.5)
plt.bar('Region', 'State_Fund_Release2016', data = df, color = 'red', label = "State fund Released", alpha = 0.5
plt.legend()
plt.xticks(rotation = 90, fontsize = 10)
plt.show
Below is the output which I am getting
Desired output:
I want my plot to look similar to the below image
Please suggest some method to get the desired output