diff --git a/implot.cpp b/implot.cpp index fa3e126..9332fd3 100644 --- a/implot.cpp +++ b/implot.cpp @@ -956,17 +956,15 @@ bool BeginPlot(const char* title, const char* x_label, const char* y_label, cons } // adaptive divisions - if (HasFlag(plot.XAxis.Flags, ImPlotAxisFlags_Adaptive)) { - plot.XAxis.Divisions = (int)IM_ROUND(0.003 * gp.BB_Canvas.GetWidth()); - if (plot.XAxis.Divisions < 2) - plot.XAxis.Divisions = 2; - } + plot.XAxis.Divisions = (int)IM_ROUND(0.003 * gp.BB_Canvas.GetWidth()); + if (plot.XAxis.Divisions < 2) + plot.XAxis.Divisions = 2; + for (int i = 0; i < MAX_Y_AXES; i++) { - if (HasFlag(plot.YAxis[i].Flags, ImPlotAxisFlags_Adaptive)) { - plot.YAxis[i].Divisions = (int)IM_ROUND(0.003 * gp.BB_Canvas.GetHeight()); - if (plot.YAxis[i].Divisions < 2) - plot.YAxis[i].Divisions = 2; - } + plot.YAxis[i].Divisions = (int)IM_ROUND(0.003 * gp.BB_Canvas.GetHeight()); + if (plot.YAxis[i].Divisions < 2) + plot.YAxis[i].Divisions = 2; + } // COLORS ----------------------------------------------------------------- diff --git a/implot.h b/implot.h index 6a44563..a53fdf8 100644 --- a/implot.h +++ b/implot.h @@ -60,10 +60,9 @@ enum ImPlotAxisFlags_ { ImPlotAxisFlags_Invert = 1 << 3, // the axis will be inverted ImPlotAxisFlags_LockMin = 1 << 4, // the axis minimum value will be locked when panning/zooming ImPlotAxisFlags_LockMax = 1 << 5, // the axis maximum value will be locked when panning/zooming - ImPlotAxisFlags_Adaptive = 1 << 6, // grid divisions will adapt to the current pixel size the axis - ImPlotAxisFlags_LogScale = 1 << 7, // a logartithmic (base 10) axis scale will be used - ImPlotAxisFlags_Scientific = 1 << 8, // scientific notation will be used for tick labels if displayed (WIP, not very good yet) - ImPlotAxisFlags_Default = ImPlotAxisFlags_GridLines | ImPlotAxisFlags_TickMarks | ImPlotAxisFlags_TickLabels | ImPlotAxisFlags_Adaptive, + ImPlotAxisFlags_LogScale = 1 << 6, // a logartithmic (base 10) axis scale will be used + ImPlotAxisFlags_Scientific = 1 << 7, // scientific notation will be used for tick labels if displayed (WIP, not very good yet) + ImPlotAxisFlags_Default = ImPlotAxisFlags_GridLines | ImPlotAxisFlags_TickMarks | ImPlotAxisFlags_TickLabels, ImPlotAxisFlags_Auxiliary = ImPlotAxisFlags_Default & ~ImPlotAxisFlags_GridLines, };