secondary axes 10 times smaller that the main axes using twinx()
Question:
I am producing a plot and I want to make the secondary y-axes 10 times smaller than the main y-axes.
ax2 = ax.twinx()
sns.lineplot(data=df["A"], ax=ax)
sns.lineplot(data=df["B"], ax=ax2)
is it possible to do define ax2 = ax.twinx()/10
? how can specifcy that ax2 should be 10 times lower than ax? for example if ax
goes from 0 to 100, ax2
should go from 0 to 1.
Answers:
I am producing a plot and I want to make the secondary y-axes 10 times smaller than the main y-axes.
ax2 = ax.twinx()
sns.lineplot(data=df["A"], ax=ax)
sns.lineplot(data=df["B"], ax=ax2)
is it possible to do define ax2 = ax.twinx()/10
? how can specifcy that ax2 should be 10 times lower than ax? for example if ax
goes from 0 to 100, ax2
should go from 0 to 1.