Dynamic scaling breaks dynamic plots
I'm trying to create a dynamic plot that manages it's own scaling on the Y axis; ideally I'd like to watch the dynamic data coming in to track the highest/lowest values seen and use those values to determine the scale.
Here's a jsfiddle that demonstrates a) how I'm trying to achieve my goal and b) the result. Rendering is controlled by the boolean withCustomResetAxes:
When set to false, replot will be called with resetAxes:true (auto-scaling)
When set to true, replot will be called with min/max settings for both xaxis & yaxis
Regardless of the value that withCustomResetAxes is set to, every 4 seconds a new set of data-points will be generated for the plot. These generated values are only displayed when using auto-scaling. When using custom scaling, the scales adjust as expected but the new data-points are ignored.