✊🏿 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),
        yaxis={'title':'x[m]', 'side':'right'})

# switch the x- and y-coordinates




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

# reverse the range of the xaxis (which contains the y values)

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