From 5ebff17f89bb527a20e8efbb3111d3419bfd488f Mon Sep 17 00:00:00 2001 From: "Ryan@SOLARIS_testStation" Date: Tue, 20 Aug 2024 12:31:36 -0400 Subject: [PATCH] Histogram1D: ymax only update when line is visible --- Histogram1D.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Histogram1D.h b/Histogram1D.h index 323a9dd..0117a04 100644 --- a/Histogram1D.h +++ b/Histogram1D.h @@ -333,7 +333,7 @@ public: if( 0 <= index1 && index1 <= 2*xBin) yList[ID][index1] += 1; if( 0 <= index1 && index2 <= 2*xBin) yList[ID][index2] += 1; - if( yList[ID][index1] > yMax ) yMax = yList[ID][index1]; + if( showHist[ID] && yList[ID][index1] > yMax ) yMax = yList[ID][index1]; } void Print(unsigned int ID = 0){