I have two different datasets with a common index, and I want to present the first as a barplot, and the second as a line chart on the same chart. My current approach is similar to the following.
ax = pt.a.plot(alpha = .75, kind = 'bar')
ax2 = ax.twinx()
ax2.plot(ax.get_xticks(), pt.b.values, alpha = .75, color = 'r')
And the result is similar to this

This image is really nice and almost correct. My only problem is that ax.twinx()it seems to be creating a new canvas on top of the previous one, and the white lines are clearly visible on top of the barrel.
Is there any way to build this without including white lines?
source
share