Hello! I’m trying to make a multi y-axis graph for a dash app I’m working on, but it isn’t turning out how I like.
As you can see the Engine RPM axis is covering part of the graph. I mostly followed the code here.
fig = go.Figure()
fig.add_trace(
go.Scatter(
x = [entry[1] for entry in throttles],
y = [entry[0] for entry in throttles],
name = 'Throttle'
)
)
fig.add_trace(
go.Scatter(
x = [entry[1] for entry in engine_rpms],
y = [entry[0] for entry in engine_rpms],
name = 'Engine RPM',
yaxis='y2'
)
)
fig.add_trace(
go.Scatter(
x = [entry[1] for entry in speeds],
y = [entry[0] for entry in speeds],
name = 'Speed',
yaxis='y3'
)
)
fig.update_layout(
yaxis=dict(
title="Throttle",
),
yaxis2=dict(
title="Engine RPM",
anchor="free",
overlaying="y",
side="left",
position=0.15
),
yaxis3=dict(
title="Speed",
anchor="x",
overlaying="y",
side="right"
),
paper_bgcolor='#f9f9f9',
plot_bgcolor='#f9f9f9'
)
Does anyone know what I can do to make the multiple axes look correct?