Reputation: 195
This is my code:
plt.bar(df.index, df['January'])
plt.bar(df.index, df['February'])
This is the figure that I get:
How can I get the orange and blue bars side-by-side?
Upvotes: 0
Views: 101
Reputation: 150745
You can use Pandas' plotting function:
df.plot.bar(y=['January','February'])
Or manually align the bars:
width=0.4
plt.bar(df.index, df['January'], width=-width, align='edge')
plt.bar(df.index, df['February'], width=width, align='edge')
Upvotes: 1