20 TF1 *pdfunc =
new TF1(
"pdf",
"ROOT::Math::normal_pdf(x, [0],[1])",-5,5);
21 TF1 *cdfunc =
new TF1(
"cdf",
"ROOT::Math::normal_cdf(x, [0],[1])",-5,5);
22 TF1 *ccdfunc =
new TF1(
"cdf_c",
"ROOT::Math::normal_cdf_c(x, [0])",-5,5);
23 TF1 *qfunc =
new TF1(
"quantile",
"ROOT::Math::normal_quantile(x, [0])",0,1);
24 TF1 *cqfunc =
new TF1(
"quantile_c",
"ROOT::Math::normal_quantile_c(x, [0])",0,1);
26 pdfunc->SetParameters(1.0,0.0);
28 pdfunc->SetLineColor(kBlue);
30 pdfunc->GetXaxis()->SetLabelSize(0.06);
31 pdfunc->GetXaxis()->SetTitle(
"x");
32 pdfunc->GetXaxis()->SetTitleSize(0.07);
33 pdfunc->GetXaxis()->SetTitleOffset(0.55);
34 pdfunc->GetYaxis()->SetLabelSize(0.06);
36 cdfunc->SetParameters(1.0,0.0);
38 cdfunc->SetLineColor(kRed);
40 cdfunc->GetXaxis()->SetLabelSize(0.06);
41 cdfunc->GetXaxis()->SetTitle(
"x");
42 cdfunc->GetXaxis()->SetTitleSize(0.07);
43 cdfunc->GetXaxis()->SetTitleOffset(0.55);
45 cdfunc->GetYaxis()->SetLabelSize(0.06);
46 cdfunc->GetYaxis()->SetTitle(
"p");
47 cdfunc->GetYaxis()->SetTitleSize(0.07);
48 cdfunc->GetYaxis()->SetTitleOffset(0.55);
50 ccdfunc->SetParameters(1.0,0.0);
51 ccdfunc->SetTitle(
"");
52 ccdfunc->SetLineColor(kGreen);
54 qfunc->SetParameter(0, 1.0);
56 qfunc->SetLineColor(kRed);
59 qfunc->GetXaxis()->SetLabelSize(0.06);
60 qfunc->GetXaxis()->SetTitle(
"p");
61 qfunc->GetYaxis()->SetLabelSize(0.06);
62 qfunc->GetXaxis()->SetTitleSize(0.07);
63 qfunc->GetXaxis()->SetTitleOffset(0.55);
64 qfunc->GetYaxis()->SetTitle(
"x");
65 qfunc->GetYaxis()->SetTitleSize(0.07);
66 qfunc->GetYaxis()->SetTitleOffset(0.55);
68 cqfunc->SetParameter(0, 1.0);
70 cqfunc->SetLineColor(kGreen);
73 TCanvas * c1 =
new TCanvas(
"c1",
"Normal Distributions",100,10,600,800);
79 TLegend *legend1 =
new TLegend(0.583893,0.601973,0.885221,0.854151);
80 legend1->AddEntry(pdfunc,
"normal_pdf",
"l");
85 ccdfunc->Draw(
"same");
86 TLegend *legend2 =
new TLegend(0.585605,0.462794,0.886933,0.710837);
87 legend2->AddEntry(cdfunc,
"normal_cdf",
"l");
88 legend2->AddEntry(ccdfunc,
"normal_cdf_c",
"l");
94 TLegend *legend3 =
new TLegend(0.315094,0.633668,0.695179,0.881711);
95 legend3->AddEntry(qfunc,
"normal_quantile",
"l");
96 legend3->AddEntry(cqfunc,
"normal_quantile_c",
"l");