Set up range for y2-axis (subplots)

I would like to set up the range for y2-axis (subplots).

I was able to set up the range for the y1-axis as follows:


How can i do the same with the y2-axis?


Update yaxis2 in the same way:

fig.update_layout(yaxis_range=[LCL-0.5, UCL+0.5],
                 yaxis2_range=[1, 15])
1 Like

Thank you, it works well. Before I tried


and now i know, why i did not work.

I have 4 subplots and i want to set different ranges for the secondary y axis of each plot. The snippet above doesn’t work on each subplot individually nor this functions takes row and col as argument. Do you have a solution to this?