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