From 2b46c3eac338e30052b7320cd97a4c571e060d15 Mon Sep 17 00:00:00 2001 From: epezent Date: Sun, 6 Sep 2020 21:04:36 -0500 Subject: [PATCH] fix axis constraints --- implot.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/implot.cpp b/implot.cpp index a3ebb53..e497876 100644 --- a/implot.cpp +++ b/implot.cpp @@ -1145,6 +1145,12 @@ bool BeginPlot(const char* title, const char* x_label, const char* y_label, cons gp.Scales[i] = ImPlotScale_LogLog; } + // constraints + plot.XAxis.Constrain(); + for (int i = 0; i < IMPLOT_Y_AXES; ++i) + plot.YAxis[i].Constrain(); + + // AXIS COLORS ----------------------------------------------------------------- UpdateAxisColors(ImPlotCol_XAxis, &gp.Col_X);