How can I increase space with the top margin

Hi,

I am trying to understand the plotly api.

I have the following image:

Here is the corresponding code:

Now as you can see, the top x-axis sort of interferes with the left y axis. How can I increase the spacing so that it renders properly? Is there anything in the api that can fix this?