Since you call twinx then twiny, you're creating two additional axes, not one.
And I guess this is why labels are drawn twice. You may do
def twin(ax):
ax2 = ax.figure.add_axes(ax.get_position(True),
frameon=False)
ax2.yaxis.tick_right()
a
Hi everyone,
I am plotting a figure where I need two independent x axes and two
independent y axes. I've tried to use both twinx and twiny at the
same time, and this works to some extent, but it looks like it is
plotting the labels for the bottom x axis and the right-hand y axis
twice, whi