First line of Stat Box

Hi, I don’t like having the “Name” of the histogram in my stats boxes. If I remove them with the appropriate SetOptStat(magic), whatever quantity appears in the first line of the stat box is displayed differently than the others.


TH1D h("h","h",10,0,10);
h.Draw(); // First line is "h", second line is "Entries     0"
gStyle->SetOptStat(1100); // Histogram name is gone, but first line is now "Entries = 0"

Note the equal sign and the horizontal bar separating the first line from the other lines in the stat box.

How can I get a stat box that shows the quantities I want (without the title) and without special formatting in the first line?


Hi Jean-François,

what you might want to have only the stats w/o the histogram name is:

TH1D h("h","h",10,0,10);


You should do the gStyle setting (it is a global one) before doing the Draw().