epezent / implot

Immediate Mode Plotting
MIT License
4.64k stars 516 forks source link

Fit the axes to new data only once #415

Closed hinxx closed 1 year ago

hinxx commented 1 year ago

If I change the amount of the data to plot the X axis range remains unchanged. Once I double click the plot I get what I want.

I tried using ImPlotAxisFlags_AutoFit and ImPlotAxisFlags_RangeFit but the effect is desirable; I can not pan or zoom anymore.

Is there a way to achieve the resizing/fitting of the axes only when the underlaying data size changes?

epezent commented 1 year ago

Call SetNextAxisToFit or SetNextAxesToFit before BeginPlot

hinxx commented 1 year ago

Works, Thanks!