Plotting a TH1F with error bars and simple line

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

1 Like

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

1 Like

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

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

1 Like

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

:wink:

Thanks.

Tina