Bug in TLegend?

Dear Rooters,

I want to display an error bar within a TLegend. According to the reference guide for my version (5.20), this can be achieved by specifying the option ‘E’ together with option ‘P’ . [quote] E draw vertical error bar if option “P” is also specified[/quote]
The behavior I observe is that I can only get the error bar displayed by specifing option ‘L’ as well. (‘LE’ also displays the error bar, however it is not what I want.). Is this a (known) bug or am I doing something wrong?



The following code reproduces the problem

 TH1F *h1 = new TH1F("h1","h1",100,-10,10);
  TLegend *leg = new TLegend(0.1,0.5,0.3,0.7);
  TLegend *leg1 = new TLegend(0.1,0.7,0.3,0.9);
  leg->AddEntry(h1,"A gaussian","PE");
  leg1->AddEntry(h1,"A second legend for the gaussian","LPE");

I’ll investigate.

Ok, actually it is a bug in the help you should read:

I’ll fix that. Thanks to have seen it.

Ok, I see. Then my question would be if there is any possibility to get this behavior, i.e. display a point and only the y error bar?

also more general approaches like gStyle->SetErrorX(0) do not influence the error bar displayed in the legend.



Right now nothing like that is foreseen. The vertical bar goes with the horizontal one.