plotly.py
plotly.py copied to clipboard
matching secondary_y range to primary by each row of subplots
Hi, I have a subplot with 1 column and 5 rows. each plot in a row has a secondary_y axis. I would like to match the range of secondary_y and primary_y axis to each other, whichever has the max. I have been searching for quite some time, but could not find anything.


matches is the right attribute, but you need to figure out the specific axes you're trying to match - I'm not sure what order make_subplots puts the axes in but you presumably have y, y2, y3, and y4... so it's probably either:
fig.update_layout(yaxis4_matches='y')
or
fig.update_layout(yaxis3_matches='y2')