29 R__LOAD_LIBRARY(libMathMore);
31 TCanvas *Canvas =
new TCanvas(
"DistCanvas",
"Legendre polynomials example", 10, 10, 750, 600);
33 TLegend *leg =
new TLegend(0.5, 0.7, 0.4, 0.89);
36 for(
int nu = 0; nu <= 4; nu++)
38 L[nu]=
new TF1(
"L_0",
"ROOT::Math::legendre([0],x)", -1, 1);
39 L[nu]->SetParameters(nu, 0.0);
40 L[nu]->SetLineStyle(1);
41 L[nu]->SetLineWidth(2);
42 L[nu]->SetLineColor(nu+1);
46 L[0]->SetTitle(
"Legendre polynomials");
47 leg->AddEntry(L[0]->DrawCopy(),
" L_{0}(x)",
"l");
48 leg->AddEntry(L[1]->DrawCopy(
"same"),
" L_{1}(x)",
"l");
49 leg->AddEntry(L[2]->DrawCopy(
"same"),
" L_{2}(x)",
"l");
50 leg->AddEntry(L[3]->DrawCopy(
"same"),
" L_{3}(x)",
"l");
51 leg->AddEntry(L[4]->DrawCopy(
"same"),
" L_{4}(x)",
"l");