Skip to content

Commit

Permalink
Fix - do not touch hist axis with custom labels #297
Browse files Browse the repository at this point in the history
If custom labels are configured for the X axis,
range should be calculated differently.
For the moment just keep axis as is.
  • Loading branch information
linev committed Apr 23, 2024
1 parent e2e872b commit f363187
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/hist2d/TGraphPainter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,12 @@ class TGraphPainter extends ObjectPainter {

setHistogramTitle(histo, this.getObject().fTitle);

if (set_x) {
if (set_x && !histo.fXaxis.fLabels) {
histo.fXaxis.fXmin = uxmin;
histo.fXaxis.fXmax = uxmax;
}

if (set_y) {
if (set_y && !histo.fYaxis.fLabels) {
histo.fYaxis.fXmin = Math.min(minimum0, minimum);
histo.fYaxis.fXmax = Math.max(maximum0, maximum);
histo.fMinimum = minimum;
Expand Down

0 comments on commit f363187

Please sign in to comment.