Skip to content

Commit fee2e79

Browse files
committed
Correctly reset contour in TH3 painter
1 parent 97e005d commit fee2e79

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

modules/hist/TH3Painter.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,9 @@ class TH3Painter extends THistPainter {
396396
const histo = this.getHisto(),
397397
fp = this.getFramePainter();
398398

399+
// ensure proper colors
400+
this.resetContour();
401+
399402
let use_lambert = false,
400403
use_helper = false, use_colors = false, use_opacity = 1, exclude_content = -1,
401404
logv = this.getPadPainter()?.getRootPad()?.fLogv,

modules/hist2d/THistPainter.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2322,6 +2322,12 @@ class THistPainter extends ObjectPainter {
23222322
return cntr;
23232323
}
23242324

2325+
/** @summary Reset contour object
2326+
* @private */
2327+
resetContour() {
2328+
this.#contour = undefined;
2329+
}
2330+
23252331
/** @summary Return Z-scale ranges to create contour */
23262332
#getContourRanges(main, fp) {
23272333
const o = this.getOptions(),
@@ -2902,7 +2908,7 @@ class THistPainter extends ObjectPainter {
29022908
this.maxbin = this.minbin = 0;
29032909

29042910
// force recalculation of z levels
2905-
this.#contour = undefined;
2911+
this.resetContour();
29062912

29072913
if (args.zrange)
29082914
Object.assign(res, this.#getContourRanges(this.getMainPainter(), this.getFramePainter()));

0 commit comments

Comments
 (0)