Change Y axis direction

I have a simple time series plot which is constructed like

  import plotly.graph_objects as go

  data = []
  for model in models:
        ...        
        data.append(go.Scatter(x=x, y=y, name=event_name))

  layout = dict(title='Events progress')
  fig = dict(data=data, layout=layout)
  fig = go.Figure(fig)
  fig.update_layout(autosize=False, width=1000, height=1000)
  fig.write_image(mypath);

But I need Y axis to grow down so that 0 point would be at left top corner. How can I perform it ?

Ok. Somebody helped me in stackoverflow.
Just need this

fig.update_yaxes(autorange="reversed")
2 Likes

Hi @arturgudiev,
Welcome to Plotly forum!
To reverse the order on yaxis, you must perform this update:
fig.update_yaxes(autorange='reversed').

1 Like