mirror of
https://github.com/gwm17/implot.git
synced 2024-11-23 02:38:53 -05:00
add quick fix for fitting data when data is a flat line (see #50)
This commit is contained in:
parent
bb2ff2aea7
commit
70f56d8a40
|
@ -1604,6 +1604,10 @@ void EndPlot() {
|
|||
if (gp.FitY[i] && !ImHasFlag(plot.YAxis[i].Flags, ImPlotAxisFlags_LockMax) && !NanOrInf(gp.ExtentsY[i].Max)) {
|
||||
plot.YAxis[i].Range.Max = gp.ExtentsY[i].Max;
|
||||
}
|
||||
if ((plot.YAxis[i].Range.Max - plot.YAxis[i].Range.Min) <= (2.0 * FLT_EPSILON)) {
|
||||
plot.YAxis[i].Range.Max += FLT_EPSILON;
|
||||
plot.YAxis[i].Range.Min -= FLT_EPSILON;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user