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); h1->FillRandom("gaus",1000); h1->SetMarkerStyle(20); leg->AddEntry(h1,"A gaussian","PE"); leg1->AddEntry(h1,"A second legend for the gaussian","LPE"); h1->Draw("histe1"); leg->Draw(); leg1->Draw();