I have two dataframes, both of them indexed by a timestamp. I want to plot one of them as a bar chart and the other as a line chart along the same x axis (but with different y scales). I thought the following would work…
ax = df[ts1:ts2].plot(y='A', kind='bar')
df2[ts1:ts2].plot(y='B', ax=ax, secondary_y=True)
But this only ends up plotting the bar chart. If I don’t include kind='bar'
in the first line it does basically work. But I would really like for it to a bar chart