I would like to get a plot with more than two different y-axes in seaborn using a pandas dataframe similar to this example for matlotlib: https://matplotlib.org/examples/axes_grid/demo_parasite_axes2.html
As it will be used in a function I want to be flexible in selecting how many and which column of a Pandas dataframe will be ploted.
Unfortunately Seaborn seems to only move the last added scale. Here is what I want to do with a Seaborn sample dataset:
import matplotlib.colors as mcolors
import matplotlib.pyplot as plt
import seaborn as sns
df=sns.load_dataset("mpg")
df=df.loc[df['model_year']<78]
show=['mpg','displacement','acceleration']
sns.set(rc={'figure.figsize':(11.7,8.27)})
sns.scatterplot('weight',show[0],data=df.reset_index(),style='model_year')
del show[0]
k=1
off=0
for i in show:
a = plt.twinx()
a=sns.scatterplot('weight',i,data=df.reset_index(),ax=a, color=list(mcolors.TABLEAU_COLORS)[k],legend=False,style='model_year')
a.spines['right'].set_position(('outward', off))
a.yaxis.label.set_color(list(mcolors.TABLEAU_COLORS)[k])
k+=1
off+=60

I want to create a function with the possibility to flexible plot different columns. Up to now this seems to be quite complicated in plotly to me (no way of just do a loop). I would also go with plotly, if there is a good way.

