Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Two y-axis (one for Bar and one for Scatter)

I am making a plotly chart that needs two y-axis.
I can get this to work if I only have two traces (data1 and data2)

My problem:
I add everything inside repeat looks, so I end up with something like:
trace1 = go.Scatter (temperature at 12.00), trace2 = go.Scatter ( temperature at 14.00) etc
trace8 = go.Bar (wind at 12.00), trace9 = go.Bar( wind at 14.00), etc.

Is there a way to have the windspeed (go.Bar) y-axis on the right and the temperature (go.Scatter) y-axis on the left ?

Yes, you can set two y-axes, one at left and another at right.
Insert in go.Bar the corresponding axes:

trace8=go.Bar(wind at xx.00, xaxis='x1', yaxis='y2')

inside go.Layout(…)
set:

xaxis=XAxis(...), yaxis=Yaxis(...), yaxis2=YAxis('anchor'=x, overlaying='y', side='right')

Thanks a lot for you help, the syntax was slightly different, so I include it here:

trace = []
trace.append(go.Bar(
    x = xaksis,
    y = this_preassure[dtype],
    name = graphname,
     )
 )

trace.append(go.Scatter(
    x = xaksis,
    y = this_preassure[dtype],
    name = graphname,
    line = dict(
          width = 2,
         ),
    yaxis='y2'
 )
 
layout = go.Layout(title=title,
                    legend=dict(orientation= "v"),
                    yaxis=dict(
                        title=title1,
                        rangemode='tozero',
                        titlefont=dict(
                            color='rgb(248, 23, 189)'
                        ),
                        tickfont=dict(
                            color='rgb(248, 23, 189)'
                        ),
                        side='right'
                    ),
                    yaxis2=dict(
                        title=title2,
                        rangemode='tozero',
                        titlefont=dict(
                            color=color2
                        ),
                        tickfont=dict(
                            color=color2
                        ),
                        overlaying='y',
                        side='left'
                    )
    )