Hi ROOTers!!!
I have need your help for what concerne histogram
1)It is possible draw a histogram similar to a graph, with only the point(marker), without the columns?
How can I set the errorbars? I kow that to draw the errorbars the command is:
my_hist->Draw(“E1”) , but for set the error for each point? if it is possible xerrors and yerrors, and maybe asymmetrical errors, xerror hight and x error low.
Is normal that when i declare an histogram, then the result is: (class TH1F *) 0x16dadf0 ??
It is possible in ROOT 6 draw a histogram with data from dat files?
Thank you very much for the answer and sorry if I was not clear
What I mean with x error and y error is the error on the measures of the data.
And the dat file I mean the txt file with more columns of data.
It looks like your binning might not be regular…
So you will have to read this file using normal C++ code.
And then you will need to use root.cern.ch/doc/master/classTH … 0f36b4c62d
to book the histogram.
That is just a guess. You have a table with x values (hopefully in increasing order). This x array will define your binning. If the distance between each x value is same, then you will have a regular binning and you can use the normal constructor. But given the fact it seems you have le low boundary of each bin, having non regular binning is possible. That is why I said your binning “might not be regular”… and in that case you can use the constructor I was referring to in my previous post.
Looking at your “x y dx dy err_h-x err_l-x err_h-y err_l-y”, I would say you are asking for: TGraphAsymmErrors
Or … try somethign like this: TTree *t = new TTree("t", "a tree");
t->ReadFile("DataFile.txt", "x/D:y:dx:dy:err_h_x:err_l_x:err_h_y:err_l_y"); and then, for example:
t->Draw(“x”);
t->Draw(“y”);
t->Draw(“y:x”);