Learn how to use Dash Bio for next-gen sequencing & quality control. 🧬Register for the Oct 27 webinar.

How to share yaxes for secondary axes?

Hello,

I would like to coordinate trace5 and trace 6 in the code below unfortunately share_axes doens’t seem to work with secondary y axis : When I move the plot in the top right, it doesn’t move trace 6 (the secondary of the top left plot).
How to solve this problem ?

import numpy as np
import plotly.graph_objects as go
from plotly.subplots import make_subplots
nb_rows = 2
spe = [[{"secondary_y": True}, {"secondary_y": True}] for i in range(nb_rows)]
fig = make_subplots(rows=nb_rows, cols=2
                        , shared_xaxes='columns', shared_yaxes='rows',specs=spe
                        # ,subplot_titles=['Oil prodution','Separator pressure','LCV DFF','Level DFF','LCV DFG','Level DFG' ]
                        )

fig.add_trace(go.Scatter(x=list(range(1,100)), y=list(range(1,100)) 
                        
                        ),row=1,col=1 )


fig.add_trace(go.Scatter(x=list(range(1,100)), y=list(range(1,100)) ,showlegend=True
                        
                        ),row=2,col=1 )





fig.add_trace(go.Scatter(x=list(range(1,100)), y=list(range(101,200)) 
                        
                        ),row=1,col=2 )


fig.add_trace(go.Scatter(x=list(range(1,100)), y=list(range(1,100)) ,showlegend=True
                        
                        ),row=2,col=2 )







fig.add_trace(go.Scatter(x=list(range(1,100)), y=list(range(1,100)) ,showlegend=True
                        
                        ),row=2,col=2 )




fig.add_trace(go.Scatter(y=[70]*99, x=list(range(1,100)) ,showlegend=True
                        
                        ),row=1,col=1,secondary_y=True )


fig.add_trace(go.Scatter(y=[50]*99, x=list(range(1,100)) ,showlegend=True
                        
                        ),row=1,col=2,secondary_y=True )
fig.show()
type or paste code here