Skip to content

Commit 761ccbe

Browse files
committed
Fix - correct Y-axis range selection in logarithmic scale
1 parent 301d22d commit 761ccbe

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

scripts/JSRootPainter.hist.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2261,6 +2261,7 @@
22612261
fp.CreateXY({ ndim: this.Dimension(),
22622262
check_pad_range: this.check_pad_range,
22632263
create_canvas: this.create_canvas,
2264+
ymin_nz: this.ymin_nz,
22642265
swap_xy: (this.options.BarStyle >= 20),
22652266
reverse_x: this.options.RevX,
22662267
reverse_y: this.options.RevY,

scripts/JSRootPainter.v6.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,8 +1195,8 @@
11951195
if (this.scale_ymin>0) break;
11961196
}
11971197

1198-
if ((this.scale_ymin <= 0) && ('ymin_nz' in this) && (this.ymin_nz > 0) && (this.ymin_nz < 1e-2*this.ymax))
1199-
this.scale_ymin = 0.3*this.ymin_nz;
1198+
if ((this.scale_ymin <= 0) && (opts.ymin_nz) && (opts.ymin_nz < 1e-2*this.ymax))
1199+
this.scale_ymin = 0.3 * opts.ymin_nz;
12001200

12011201
if ((this.scale_ymin <= 0) || (this.scale_ymin >= this.scale_ymax))
12021202
this.scale_ymin = 3e-4 * this.scale_ymax;

0 commit comments

Comments
 (0)