✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

How can you reverse an axis and set its range at the same time?

I need a plot in which my Y axis is reversed. However I also need to be able to set its range.
Using autorange reverse do reverse my axis but cannot set the range anymore.

How can I do this?

layout1= go.Layout(title=go.layout.Title(text="A graph",x=0.5),
        xaxis={'title':'y[m]','autorange':'reversed','range':[-10,10]},
        yaxis={'title':'x[m]', 'side':'right'})

# switch the x- and y-coordinates

point_plot=[

            go.Scatter(y=[3],x=[1],name="V0"),
            go.Scatter(y=[5],x=[2],name="GT"),
            go.Scatter(y=[0],x=[0],name="egoCar")

    ]

fig = go.Figure(data=point_plot, layout=layout1)

# reverse the range of the xaxis (which contains the y values)
#fig.update_xaxes(autorange="reversed")
fig.show()

Right now the Y axis is from 0 to 2 not -10,10