Home | News | Documentation | Download

Plotting a TH1F with error bars and simple line


#1

Hi Rooters,

I have a very simple and, probably, stupid question.

I have a TH1F object, with error bars for every contents.

I want to plot the markers with the error bars and also a simple line to join them. I’ve tried to do it with the Editor or with "histo->Draw(“l*”) " without success. :frowning:

Why??

Thanks.
Tina


#2

See options “E”, “E0”, …, “E6” and “X0” in the “Options supported for 1D histograms” and in “The error bars options” paragraphs here: http://root.cern.ch/root/html/THistPainter.html


#3

Thanks for the answer. :slight_smile:

I know the options but the problem is when I try to combine them together.

For example, “h->Draw(“e1c”)” doesn’t produce the effect I desire, i.e. a TH1F with errror bars and a curve between bins.
:frowning:

Thanks.
Tina


#4

A brutal fix:
h->Draw(“E1”);
h->Draw(“C SAME”);


#5

I’ve already solved in this way… but it is not satisfying to me.

:wink:

Thanks.

Tina