28 TString dir = gROOT->GetTutorialDir();
29 dir.Append(
"/hsimple.C");
30 dir.ReplaceAll(
"/./",
"/");
31 if (gBenchmark->GetBench(
"hsimple") < 0) gInterpreter->LoadMacro(dir.Data());
32 TFile *example = (TFile*)gROOT->ProcessLineFast(
"hsimple(1)");
36 TH1 *hpx = (TH1*)example->Get(
"hpx");
38 TCanvas *c1 =
new TCanvas(
"c1",
"Histogram Drawing Options",200,10,700,900);
39 TPad *pad1 =
new TPad(
"pad1",
40 "The pad with the function",0.03,0.62,0.50,0.92);
41 TPad *pad2 =
new TPad(
"pad2",
42 "The pad with the histogram",0.51,0.62,0.98,0.92);
43 TPad *pad3 =
new TPad(
"pad3",
44 "The pad with the histogram",0.03,0.02,0.97,0.57);
50 TPaveLabel *title =
new TPaveLabel(0.1,0.94,0.9,0.98,
51 "Drawing options for one dimensional histograms");
52 title->SetTextFont(52);
57 pad1->GetFrame()->SetFillColor(18);
58 hpx->SetFillColor(45);
60 TPaveLabel *label1 =
new TPaveLabel(-3.5,700,-1,800,
"Default option");
66 hpx->DrawCopy(
"lego1");
67 TPaveLabel *label2 =
new TPaveLabel(-0.72,0.74,-0.22,0.88,
"option Lego1");
69 TPaveLabel *label2a =
new TPaveLabel(-0.93,-1.08,0.25,-0.92,
70 "Click on lego to rotate");
77 hpx->SetMarkerStyle(21);
79 TPaveLabel *label3 =
new TPaveLabel(2,600,3.5,650,
"option e1p");
85 TPaveText *pave =
new TPaveText(-3.78,500,-1.2,750);
86 TText *t1=pave->AddText(
"You can move");
88 t1->SetTextSize(0.05);
89 pave->AddText(
"Title and Stats pads");
90 pave->AddText(
"X and Y axis");
91 pave->AddText(
"You can modify bin contents");