What is the proper syntax of go.YAxis?

What I want to do is to put the Yaxis of one of my subplots at the right side of the axis instead of left side

When I use go.Yaxis I get the following message

plotly.graph_objs.YAxis is deprecated.
Please replace it with one of the following more specific types

  • plotly.graph_objs.layout.YAxis
  • plotly.graph_objs.layout.scene.YAxis

Here is my code (it works with it):

       yaxis2=go.YAxis(overlaying='y', side='right')

But with the message, I tried with this syntax:

       yaxis2=go.layout.YAxis(overlaying='y', side='right')

But when I do it, it doesn’t put it on the right side of the axis

Here is the graph (the Yaxis2 in the center should be put at the right side)


There is probably a small modification to make but I didn’t find so far.

Thank you.