I know topics similar like this have been discussed before.
What I’d like to do is to plot a multicolumn Pandas DataFrame and have each column to have its own Y-axis:
Today you can do:
# DataFrame with multiple columns on it, time series index
px.line(df)
… and you get pretty much “express experience” and the chart always looks good.
However it does not handle the case when each of the column have their own scale.
What I’d like to do is something along the lines:
px.line(df, independent_y_axes=True)
… and no matter how many columns DataFrame has, all Y-axes are nicely plotted out.
I have found various recipes to do this by hand: label Y-axes, manually position them, manually tune padding, etc. This can be done if you have just one chart, because manual positioning and placement of axes is quite cumbersome. What I’d like to do is to have a function that I can throw any DataFrame with columns and then it figures out Y-axes placement for these columns automatically. The last bit is missing.
I am asking what others have tried to address this before, because I feel this is quite a common problem in data science and maybe I am missing something here.