5 TH1F *
h1 =
new TH1F(
"h1",
"TLegend Example",200,-10,10);
6 h1->FillRandom(
"gaus",30000);
8 h1->SetFillStyle(3003);
11 TF1 *
f1=
new TF1(
"f1",
"1000*TMath::Abs(sin(x)/x)",-10,10);
20 y[
i] = 1000*sin(
x[
i]+0.2);
29 gr->SetMarkerStyle(21);
30 gr->SetMarkerSize(1.3);
31 gr->SetMarkerColor(7);
35 leg->SetHeader(
"The Legend Title");
36 leg->AddEntry(
h1,
"Histogram filled with random numbers",
"f");
37 leg->AddEntry(
"f1",
"Function abs(#frac{sin(x)}{x})",
"l");
38 leg->AddEntry(
"gr",
"Graph with error bars",
"lep");
R__EXTERN TStyle * gStyle
A TGraphErrors is a TGraph with error bars.
1-D histogram with a float per channel (see TH1 documentation)
This class displays a legend box (TPaveText) containing several legend entries.