Black Lives Matter. Please consider donating to Black Girls Code today.

Shifting second y axis

I have a graph with two y axis and i want to shift the second y axes upwards so that the traces that correspond to the second y axis move upwards so that it is easier to compare the data. How would I go around doing that, is there a function in layout of sorts?

You can set the domain of each of the yaxes using layout.yaxis.domain.

the code below will put y1 on the bottom half of the graph and y2 in the top half.

layout=go.Layout(yaxis = dict ( domain = [0,0.5],overlaying='y2'),