Skip to content

Commit 5d37ff9

Browse files
committed
Fix - use histogram min/max for Z scale range in lego plot
1 parent 50cde73 commit 5d37ff9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

scripts/JSRoot3DPainter.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,9 +734,16 @@
734734

735735
this.Create3DScene();
736736

737-
this.zmin = this.options.Logz ? this.gmin0bin * 0.3 : this.gminbin;
737+
var logz = this.options.Logz;
738+
739+
this.zmin = logz ? this.gmin0bin * 0.3 : this.gminbin;
738740
this.zmax = this.gmaxbin * 1.05; // not very nice
739741

742+
if (this.histo.fMinimum !== -1111) this.zmin = this.histo.fMinimum;
743+
if (this.histo.fMaximum !== -1111) this.zmax = this.histo.fMaximum;
744+
745+
if (logz && (this.zmin<=0)) this.zmin = this.zmax * 1e-5;
746+
740747
this.DrawXYZ();
741748

742749
this.Draw3DBins();

0 commit comments

Comments
 (0)