Skip to content

Commit b55bd89

Browse files
committed
Better detect graph hist dflt range #379
Make more precise condition to detect default ranges in the existing histogram
1 parent 96e1b23 commit b55bd89

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

modules/hist2d/TGraphPainter.mjs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,14 @@ class TGraphPainter extends ObjectPainter {
7575
return true;
7676

7777
let is_normal = false;
78-
if (check_axis !== 'y')
79-
is_normal ||= (histo.fXaxis.fXmin !== 0.0011) || (histo.fXaxis.fXmax !== 1.1);
78+
if (check_axis !== 'y') {
79+
is_normal ||= ((histo.fXaxis.fXmin !== 0.0011) && (histo.fXaxis.fXmin !== 0)) ||
80+
((histo.fXaxis.fXmax !== 1.1) && (histo.fXaxis.fXmax !== 1));
81+
}
8082

8183
if (check_axis !== 'x') {
82-
is_normal ||= (histo.fYaxis.fXmin !== 0.0011) || (histo.fYaxis.fXmax !== 1.1) ||
84+
is_normal ||= ((histo.fYaxis.fXmin !== 0.0011) && (histo.fYaxis.fXmin !== 0)) ||
85+
((histo.fYaxis.fXmax !== 1.1) && (histo.fYaxis.fXmax !== 1)) ||
8386
(histo.fMinimum !== 0.0011) || (histo.fMaximum !== 1.1);
8487
}
8588

0 commit comments

Comments
 (0)