I’m trying to plot a histogram without the error bars and plot the results of the fitted function. The default drawing options for histograms in root 5 was to just plot the histogram and the fit function. Now, in root 6 the error bars are drawn by default.
At this point I can do this
draw the histogram without the error bars
if I do
I get the fitted function and the error bars.
if I do a
I get no function since HIST disables the drawing of functions…
any ideas guys?
To reply to my own post, I figured out the nuance.
the way I created my histograms was using the following fill form
This is because I had an array of values which I wanted to cast into a histogram.
I changed my code to
and now when I fit the histogram and draw it
I get a histogram drawn with no errors and the fit function superimposed.
anyway, I guess I should use ->SetBinContent instead of ->Fill(Bin,BinContent);
You could even copy your
fArray of the histogram. Either way - for solving it yourself and apologies for not receiving any help from us
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.