I’m trying to put alphanumeric axis labels in a TGraphErrors (or a TGraph) using SetBinLabel. It works like “point and click” in the TH* histogram classes, but it’s not so trivial for TGraph classes. It there an obvious way to do this, or does it involve getting the TGraph* number of bins, bin width, etc. ?
I suppose this means I have to superimpose a TGraphError with a TH1, since the histogram classes don’t seem to have means to produce error bars. Is this correct? (It’s not pretty, but at least it should work.)
[quote=“brun”]histograms can have error bars. Please see the ROOT tutorials, eg
hsum.C, h1draw.C, etc
[/quote]
Hi again Rene, and thanks for your help.
I’m sorry to be such a bore, but I still have another question – about TH1 error bars. I gathered that the error bars are computed by ROOT based on the contents of a bin. What if I want to specify the error for a measurement stored in a bin?
I.e., if I do a fill h1->Fill(x,w) it fills the bin x (e.g. event number, I’m working with a very small sample of one dozen) with a given weight w (e.g. mass of a pair of tracks). Is there a way to tell the TH1 histogram that “don’t figure out the measurement error for me, I want to fill bin x with weight w and error e” ?