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

Start plot zoomed

I draw a line plot with plotly.js then zoom the plot manually. Now I want to save the zoom limits so that I can feed them to a new plot to start it with this zoom. How can I get the zoom limits for reuse?

Here’s how: http://codepen.io/etpinard/pen/BKeyrw

Sorry, I was unclear. I want to capture the plot limits that plotly calculates when I use the zoom/pan feature of the interface. Once I have those I can certainly use what you have provided to generate the next plot. But how do I capture the limits in the first place? Thank you

here’s how: http://codepen.io/etpinard/pen/yOWzrY