Skip to content

Commit

Permalink
Use ticks size from Zaxis in palette
Browse files Browse the repository at this point in the history
  • Loading branch information
linev committed Nov 28, 2024
1 parent 19855ad commit 2226481
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/hist/TPavePainter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -893,11 +893,12 @@ class TPavePainter extends ObjectPainter {

this._palette_vertical = (palette.fX2NDC - palette.fX1NDC) < (palette.fY2NDC - palette.fY1NDC);

axis.fTickSize = 0.6 * s_width / width; // adjust axis ticks size
axis.fTickSize = 0.03; // adjust axis ticks size

if ((typeof zaxis?.fLabelOffset !== 'undefined') && !is_th3) {
axis.fBits = zaxis.fBits & ~EAxisBits.kTickMinus & ~EAxisBits.kTickPlus;
axis.fTitle = zaxis.fTitle;
axis.fTickSize = zaxis.fTickLength;
axis.fTitleSize = zaxis.fTitleSize;
axis.fTitleOffset = zaxis.fTitleOffset;
axis.fTextColor = zaxis.fTitleColor;
Expand Down Expand Up @@ -938,13 +939,13 @@ class TPavePainter extends ObjectPainter {

if (this._palette_vertical) {
this._swap_side = palette.fX2NDC < 0.5;
axis.fChopt = '+' + (this._swap_side ? 'R' : 'L'); // clearly configure text align
axis.fChopt = 'S+' + (this._swap_side ? 'R' : 'L'); // clearly configure text align
this.z_handle.configureAxis('zaxis', gzmin, gzmax, zmin, zmax, true, [0, s_height], { log, fixed_ticks: cjust ? levels : null, maxTickSize: Math.round(s_width*sizek), swap_side: this._swap_side, minposbin: main.gminposbin });
axis_transform = this._swap_side ? null : `translate(${s_width})`;
if (pad?.fTickz) axis_second = this._swap_side ? s_width : -s_width;
} else {
this._swap_side = palette.fY1NDC > 0.5;
axis.fChopt = '+';
axis.fChopt = 'S+';
this.z_handle.configureAxis('zaxis', gzmin, gzmax, zmin, zmax, false, [0, s_width], { log, fixed_ticks: cjust ? levels : null, maxTickSize: Math.round(s_height*sizek), swap_side: this._swap_side, minposbin: main.gminposbin });
axis_transform = this._swap_side ? null : `translate(0,${s_height})`;
if (pad?.fTickz) axis_second = this._swap_side ? s_height : -s_height;
Expand Down

0 comments on commit 2226481

Please sign in to comment.