31 TCanvas *Canvas =
new TCanvas(
"DistCanvas",
"Legendre polynomials example", 10, 10, 750, 600);
36 for(
int nu = 0; nu <= 4; nu++)
38 L[nu]=
new TF1(
"L_0",
"ROOT::Math::legendre([0],x)", -1, 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");
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetParameters(const Double_t *params)
This class displays a legend box (TPaveText) containing several legend entries.
RooArgList L(const RooAbsArg &v1)
virtual void Draw(Option_t *option="")
Draw this legend with its current attributes.
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
virtual void SetMinimum(Double_t minimum=-1111)
Set the minimum value along Y for this function In case the function is already drawn, set also the minimum in the helper histogram.
virtual void SetGrid(Int_t valuex=1, Int_t valuey=1)
virtual void SetLineColor(Color_t lcolor)
Set the line color.
R__EXTERN TSystem * gSystem
virtual void SetMaximum(Double_t maximum=-1111)
Set the maximum value along Y for this function In case the function is already drawn, set also the maximum in the helper histogram.
virtual void SetTitle(const char *title="")
Set function title if title has the form "fffffff;xxxx;yyyy", it is assumed that the function title i...
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.