Error bar symbol

Hello!

The last argument of the function, AddEntry,
is to specify the Draw Options.
It does not, however, accept the error bar options such as E or E1.
Since these options are used to draw the histogram,
the same symbol needs to be drawn along with the marker.

Best Regards,
Sangryul Ro

What are you talking about ?
Can you send a little macro showing the problem you encounter ?

It is fine with p at the last argument in the command,
legend->AddEntry(h11,“Missing E_{T}(y)”, “p”);
It shows the proper marker in the box.
But there is no effect when I put pE1 there, for example,
eventhough I expect to have the error bar shown with the marker.

As the help says you can put PE:

// Add a new entry to this legend
// obj is the object to be represented
// label is the text you wish to associate with obj in the legend
// Options are:
// L draw line associated w/ TAttLine if obj inherits from TAttLine
// P draw polymarker assoc. w/ TAttMarker if obj inherits from TAttMarker
// F draw a box with fill associated w/ TAttFill if obj inherits TAttFill
// E draw vertical error bar if option “P” is also specified
//

It is fine for me. Can you send a small running example showing your problem ?

I used the following line in my rootlogon.C file.

{
.
.
TH1 h11 = (TH1)f.Get(“METY”);
h11 -> SetMarkerColor(2);
h11 -> SetMarkerStyle(24);
h11 -> SetMarkerSize (0.8);
h11->SetLineColor(kRed);
h11->Draw(“SAME”“E1”);
legend->AddEntry(h11,“Missing E_{T}(y)”, “PE1”);
legend->Draw();
}

Only the marker, a circle, appeared on the box.
The error bar corresponding to E1 does not appear.
Did you have the error bar also?

I would like a running one ! … your code gives:

root [0]
Processing sro.C...
Error: Symbol f is not defined in current scope  FILE:sro.C LINE:2
Error: Failed to evaluate f.Get("METY")Possible candidates are...
filename       line:size busy function type and name
*** Interpreter error recovered ***

also, display a piece of code as “code” … it helps a lot to do the copy paste !