Hello,
I’m wondering if it was possible fix the Z-axis range when drawing a TH2D in “COLZ” option. I basically wish to have the plotted values to be in between -1 and 1.
Essentially, here’s pseudo logic:
TH2D myHist;
for(all of the values){
myHist->Fill(x,y,values);
}
myHist->Draw("COLZ");
}
now if I try myHist->getZAxis()->SetRange(-1,1); This has no effect whatsoever similarly SetRangeUSER(-1,1) doesn’t work either.
Issues:
- if my values are above 1, or below -1, the z range stretches anyways. I fixed this by using if statements to set values<-1 as -1, and values>1 as 1, for the sake of the plot.
- if my values are below 1, and above 1, the z range shrinks, and different colours are assigned to each range.
I was wondering if there was a certain method to FIX z, colour range to be inbetween -1 to 1.
Thank you for your time.
-SJL