I am trying to define two functions, f and g, that contain the log of the x axis of an histogram I called h1, the code I came up with is the following:
Hi,
in your loop over the bins for (Int_t b=0; b<xbins; b++) {...}
the b is a bin number, not a bin content. Are you sure you want the bin number to enter your functions f and g?
Thank you both for your help!
I removed the for loop because, Stefano you were right…I don’t need it. Now it does compile but it is impossible to draw the functions because it says that the bin content is unknown, this is impossible because I plot h1 properly and perform a series of operations correctly.
You don’t need to write XbinContent as log argument, you have to put an x as log argument and then will draw it without problems.
Otherwise you will need a TGraph