30void DrawSmooth(
Int_t pad,
const char *title,
const char *xt,
const char *yt)
33 TH1F *vFrame =
gPad->DrawFrame(0,-130,60,70);
46 dir.
Append(
"/visualisation/graphs/");
55 vInput.open(
Form(
"%smotorcycle.dat",dir.
Data()));
58 if (!vInput.good())
break;
67 vC1 =
new TCanvas(
"vC1",
"Smooth Regression",200,10,900,700);
73 grout = gs->SmoothKern(grin,
"normal",2.0);
74 DrawSmooth(1,
"Kernel Smoother: bandwidth = 2.0",
"times",
"accel");
77 grout = gs->SmoothKern(grin,
"normal",5.0);
78 DrawSmooth(2,
"Kernel Smoother: bandwidth = 5.0",
"",
"");
82 grout = gs->SmoothLowess(grin,
"",0.67);
83 DrawSmooth(3,
"Lowess: f = 2/3",
"",
"");
86 grout = gs->SmoothLowess(grin,
"",0.2);
87 DrawSmooth(4,
"Lowess: f = 0.2",
"",
"");
91 grout = gs->SmoothSuper(grin,
"",0,0);
92 DrawSmooth(5,
"Super Smoother: bass = 0",
"",
"");
95 grout = gs->SmoothSuper(grin,
"",3);
96 DrawSmooth(6,
"Super Smoother: bass = 3",
"",
"");
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
A helper class to smooth TGraph.
void Draw(Option_t *chopt="") override
Default Draw method for all objects.
1-D histogram with a float per channel (see TH1 documentation)
virtual void SetTitleSize(Float_t size=0.02, Option_t *axis="X")
Set the axis' title size.
void SetTitle(const char *title) override
Change/set the title.
virtual void SetXTitle(const char *title)
virtual void SetYTitle(const char *title)
virtual TObject * DrawClone(Option_t *option="") const
Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).
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.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
TString & Append(const char *cs)