11void mathGammaNormal(){
12 TCanvas *myc =
new TCanvas(
"c1",
"gamma and lognormal",10,10,600,800);
19 TF1 *fgamma =
new TF1(
"fgamma",
"TMath::GammaDist(x, [0], [1], [2])", 0, 10);
34 legend1->
AddEntry(
f1,
"gamma = 0.5 mu = 0 beta = 1",
"l");
35 legend1->
AddEntry(f2,
"gamma = 1 mu = 0 beta = 1",
"l");
36 legend1->
AddEntry(f3,
"gamma = 2 mu = 0 beta = 1",
"l");
37 legend1->
AddEntry(f4,
"gamma = 5 mu = 0 beta = 1",
"l");
44 TF1 *flog =
new TF1(
"flog",
"TMath::LogNormal(x, [0], [1], [2])", 0, 5);
58 legend2->
AddEntry(g1,
"sigma = 0.5 theta = 0 m = 1",
"l");
59 legend2->
AddEntry(g2,
"sigma = 1 theta = 0 m = 1",
"l");
60 legend2->
AddEntry(g3,
"sigma = 2 theta = 0 m = 1",
"l");
61 legend2->
AddEntry(g4,
"sigma = 5 theta = 0 m = 1",
"l");
virtual void SetLineColor(Color_t lcolor)
Set the line color.
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
virtual void SetMinimum(Double_t minimum=-1111)
Set the minimum value along Y for this function In case the function is already drawn,...
virtual TF1 * DrawCopy(Option_t *option="") const
Draw a copy of this function with its current attributes.
virtual void SetParameters(const Double_t *params)
This class displays a legend box (TPaveText) containing several legend entries.
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
void Draw(Option_t *option="") override
Draw this legend with its current attributes.
The most important graphics class in the ROOT system.
void SetGrid(Int_t valuex=1, Int_t valuey=1) override
void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0) override
Automatic pad generation by division.
void SetLogy(Int_t value=1) override
Set Lin/Log scale for Y.