From 8783f4621f5bb6534508e241f564ef19abfd4406 Mon Sep 17 00:00:00 2001 From: Sergey Linev Date: Tue, 18 Jun 2024 08:42:22 +0200 Subject: [PATCH] Fix - properly assign main painter for palette axis --- modules/hist/TPavePainter.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/hist/TPavePainter.mjs b/modules/hist/TPavePainter.mjs index 589c67c8b..80eed0b57 100644 --- a/modules/hist/TPavePainter.mjs +++ b/modules/hist/TPavePainter.mjs @@ -836,9 +836,10 @@ class TPavePainter extends ObjectPainter { contour = main.fContour, levels = contour?.getLevels(), is_th3 = isFunc(main.getDimension) && (main.getDimension() === 3), + is_scatter = isFunc(main.getZaxis), log = pad?.fLogv ?? (is_th3 ? false : pad?.fLogz), draw_palette = main._color_palette, - zaxis = isFunc(main.getZaxis) ? main.getZaxis() : main.getObject()?.fZaxis, + zaxis = is_scatter ? main.getZaxis() : main.getObject()?.fZaxis, sizek = pad?.fTickz ? 0.35 : 0.7; let zmin = 0, zmax = 100, gzmin, gzmax, axis_transform = '', axis_second = 0; @@ -858,8 +859,7 @@ class TPavePainter extends ObjectPainter { axis.fLabelColor = zaxis.fLabelColor; axis.fLabelFont = zaxis.fLabelFont; axis.fLabelOffset = zaxis.fLabelOffset; - if (!isFunc(main.getZaxis)) - this.z_handle.setHistPainter(main, 'z'); + this.z_handle.setHistPainter(main, is_scatter ? 'hist#z' : 'z'); this.z_handle.source_axis = zaxis; }