ROOT logo
// Example macro showing some major probability density functions in ROOT. 
// The macro shows four of them with
// respect to their two variables. In order to run the macro type:
//
//   root [0] .x mathcoreStatFunc.C 
//
//  Author: Andras Zsenei

#include "TF2.h"
#include "TSystem.h"
#include "TCanvas.h"


void mathcoreStatFunc() {

gSystem->Load("libMathCore");
TF2 *f1a = new TF2("f1a","ROOT::Math::cauchy_pdf(x, y)",0,10,0,10);

TF2 *f2a = new TF2("f2a","ROOT::Math::chisquared_pdf(x,y)",0,20, 0,20);

TF2 *f3a = new TF2("f3a","ROOT::Math::gaussian_pdf(x,y)",0,10,0,5);

TF2 *f4a = new TF2("f4a","ROOT::Math::tdistribution_pdf(x,y)",0,10,0,5);



TCanvas *c1 = new TCanvas("c1","c1",1000,750);

c1->Divide(2,2);

c1->cd(1);
f1a->Draw("surf1");
c1->cd(2);
f2a->Draw("surf1");
c1->cd(3);
f3a->Draw("surf1");
c1->cd(4);
f4a->Draw("surf1");


}
 mathcoreStatFunc.C:1
 mathcoreStatFunc.C:2
 mathcoreStatFunc.C:3
 mathcoreStatFunc.C:4
 mathcoreStatFunc.C:5
 mathcoreStatFunc.C:6
 mathcoreStatFunc.C:7
 mathcoreStatFunc.C:8
 mathcoreStatFunc.C:9
 mathcoreStatFunc.C:10
 mathcoreStatFunc.C:11
 mathcoreStatFunc.C:12
 mathcoreStatFunc.C:13
 mathcoreStatFunc.C:14
 mathcoreStatFunc.C:15
 mathcoreStatFunc.C:16
 mathcoreStatFunc.C:17
 mathcoreStatFunc.C:18
 mathcoreStatFunc.C:19
 mathcoreStatFunc.C:20
 mathcoreStatFunc.C:21
 mathcoreStatFunc.C:22
 mathcoreStatFunc.C:23
 mathcoreStatFunc.C:24
 mathcoreStatFunc.C:25
 mathcoreStatFunc.C:26
 mathcoreStatFunc.C:27
 mathcoreStatFunc.C:28
 mathcoreStatFunc.C:29
 mathcoreStatFunc.C:30
 mathcoreStatFunc.C:31
 mathcoreStatFunc.C:32
 mathcoreStatFunc.C:33
 mathcoreStatFunc.C:34
 mathcoreStatFunc.C:35
 mathcoreStatFunc.C:36
 mathcoreStatFunc.C:37
 mathcoreStatFunc.C:38
 mathcoreStatFunc.C:39
 mathcoreStatFunc.C:40
 mathcoreStatFunc.C:41
 mathcoreStatFunc.C:42