Turning off horizontal error bars in a TH1F

Is there a way to plot only the vertical error bars on a TH1F as opposed to both the vertical and horizontal ones?

I have tried the various “Ex” options (i.e. E, E1, E2, E3, …) in the string argument of TH1F::Draw(), but none seem to do what I want.

I suppose that I could fill a TH1F and copy the results over to a TGraphErrors with the horizontal errors set to zero, but this seems a bit cumbersome. Is there an easier way?



use gStyle->SetErrorX(0)


this doesn’t work when working with RooFit.
Do you have other suggestions ?

Many thanks,

  • Mauro.

Can you provide a small example ?