For some reason, the y-axis is “moved up” (see figure 1 vs. figure 2) when I add the second plot to the figure.
My code looks like this (I only copy the code for the main y-axis… I didn’t copy the code for secondary_y)
fig = make_subplots(specs=[[{'secondary_y': True}]])
fig.add_trace(go.Bar(name='Daily New Cases',
x=data.date,
y=data.new_cases,
marker_color='darkblue'))
fig.add_trace(go.Scatter(
x=data.date,
y=data.new_cases_SMA7,
mode='lines', line=dict(
width=3, color='rgb(100,140,240)'
),
name='7 days Moving Average'))