twinx makes a separate axes and zorders are only meaningful within a same axes.
Because ax2 is added to the figure later than the original axes,
artists in ax2 are always above others.
I don't think there is an easy way to make zorder work between several
axes, unless you somehow merge them into a
Hi,
Does the zorder work between twin axis? I can't get lines on the first
axis to be on top of the second grid:
plot([20,30], [0, 5], color="red", lw=5, zorder=10)
ax2=twinx()
grid(ls="-", lw=5, zorder=-1)
ax2.set_axisbelow(True)
title("Why doesn't the read line go above the second axis?")
C