29 TCanvas *Canvas =
new TCanvas(
"DistCanvas",
"Legendre polynomials example", 10, 10, 750, 600);
34 for(
int nu = 0; nu <= 4; nu++)
36 L[nu]=
new TF1(
"L_0",
"ROOT::Math::legendre([0],x)", -1, 1);
37 L[nu]->SetParameters(nu, 0.0);
39 L[nu]->SetLineWidth(2);
40 L[nu]->SetLineColor(nu+1);
44 L[0]->SetTitle(
"Legendre polynomials");
45 leg->AddEntry(L[0]->DrawCopy(),
" L_{0}(x)",
"l");
46 leg->AddEntry(L[1]->DrawCopy(
"same"),
" L_{1}(x)",
"l");
47 leg->AddEntry(L[2]->DrawCopy(
"same"),
" L_{2}(x)",
"l");
48 leg->AddEntry(L[3]->DrawCopy(
"same"),
" L_{3}(x)",
"l");
49 leg->AddEntry(L[4]->DrawCopy(
"same"),
" L_{4}(x)",
"l");
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
This class displays a legend box (TPaveText) containing several legend entries.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
void SetGrid(Int_t valuex=1, Int_t valuey=1) override
RooArgList L(Args_t &&... args)