ROOT Version: 6.14/06
Platform: Ubuntu 16.04
Compiler: 5.4.0
Hi, I have this root file attached, which contains 2D histograms.
I want to change the Y-axis’s lowest binning to start from 12 instead of current 20.
It is a variable bin that I checked with
your_histogram->GetXaxis()->IsVariableBinSize()
which gave me
(bool) true
So, I tried to change the lowest Y-bin to start from 12 instead of 20 with
your_histogram->GetXaxis()->GetXbins()[0] = 12.; // the lowest edge
but it gives me
root [3] NUM_LooseID_DEN_genTracks_eta_pt->GetYaxis()->GetYbins()[0] = 12.;
ROOT_prompt_3:1:47: error: no member named 'GetYbins' in 'TAxis'
NUM_LooseID_DEN_genTracks_eta_pt->GetYaxis()->GetYbins()[0] = 12.;
or for x -axis
root [4] NUM_LooseID_DEN_genTracks_eta_pt->GetXaxis()->GetXbins()[0] = 12.;
ROOT_prompt_4:1:61: error: no viable overloaded '='
NUM_LooseID_DEN_genTracks_eta_pt->GetXaxis()->GetXbins()[0] = 12.;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~
/home/chad/external/root/include/TArrayD.h:36:16: note: candidate function not viable: 'this' argument has type 'const TArrayD', but method is not marked const
TArrayD &operator=(const TArrayD &rhs);
What’s happening? and could you help me to successfully change the bin?
Thank you!RunGH_SF_ID.root (16.2 KB)
(example root file)