Skip to content

Commit d817efc

Browse files
committed
Fix - error drawing also when "L" option for TH1
Histogram errors painted always - disregard of line or marker options
1 parent 151409b commit d817efc

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

modules/hist2d/TH1Painter.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,13 +467,13 @@ class TH1Painter extends THistPainter {
467467
xaxis = histo.fXaxis,
468468
exclude_zero = !this.options.Zero,
469469
show_errors = this.options.Error,
470-
show_line = this.options.Line,
471470
show_curve = this.options.Curve,
472471
show_text = this.options.Text,
473472
text_profile = show_text && (this.options.TextKind === 'E') && this.isTProfile() && histo.fBinEntries,
474473
grpnts = [];
475474
let res = '', lastbin = false,
476475
show_markers = this.options.Mark,
476+
show_line = this.options.Line,
477477
startx, startmidx, currx, curry, x, grx, y, gry, curry_min, curry_max, prevy, prevx, i, bestimin, bestimax,
478478
path_fill = null, path_err = null, path_marker = null, path_line = '',
479479
hints_err = null, hints_marker = null, hsz = 5,
@@ -487,7 +487,8 @@ class TH1Painter extends THistPainter {
487487
if (this.options.ErrorKind === 2) {
488488
if (this.fillatt.empty()) show_markers = true;
489489
else path_fill = '';
490-
} else if (this.options.Error) {
490+
} else if (show_errors) {
491+
show_line = false;
491492
path_err = '';
492493
hints_err = want_tooltip ? '' : null;
493494
do_err = true;

modules/hist2d/THistPainter.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ class THistDrawOptions {
384384
if (d.check('PMC') && !this._pmc)
385385
this._pmc = 2;
386386

387-
if (d.check('L')) { this.Line = true; this.Hist = false; this.Error = false; }
387+
if (d.check('L')) { this.Line = true; this.Hist = false; }
388388
if (d.check('F')) { this.Fill = true; this.need_fillcol = true; }
389389

390390
if (d.check('A')) this.Axis = -1;

0 commit comments

Comments
 (0)