From d10d0343b2d64573645d313189ea57137c20448f Mon Sep 17 00:00:00 2001 From: ocornut Date: Sat, 11 Jul 2015 18:10:43 -0600 Subject: [PATCH] Plot() function can take 0.0f for both scale_min/scale_max to calculate scale --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index f4c13809..0fc4c020 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -6547,7 +6547,7 @@ static void Plot(ImGuiPlotType plot_type, const char* label, float (*values_gett return; // Determine scale from values if not specified - if (scale_min == FLT_MAX || scale_max == FLT_MAX) + if (scale_min == FLT_MAX || scale_max == FLT_MAX || (scale_min == 0.0f && scale_max == 0.0f)) { float v_min = FLT_MAX; float v_max = -FLT_MAX;