31 void DrawSmooth(
Int_t pad,
const char *title,
const char *xt,
const char *yt)
34 TH1F *vFrame =
gPad->DrawFrame(0,-130,60,70);
56 vInput.open(
Form(
"%smotorcycle.dat",dir.
Data()));
59 if (!vInput.good())
break;
65 grin =
new TGraph(vNData,x,y);
68 vC1 =
new TCanvas(
"vC1",
"Smooth Regression",200,10,900,700);
75 DrawSmooth(1,
"Kernel Smoother: bandwidth = 2.0",
"times",
"accel");
79 DrawSmooth(2,
"Kernel Smoother: bandwidth = 5.0",
"",
"");
84 DrawSmooth(3,
"Lowess: f = 2/3",
"",
"");
88 DrawSmooth(4,
"Lowess: f = 0.2",
"",
"");
93 DrawSmooth(5,
"Super Smoother: bass = 0",
"",
"");
97 DrawSmooth(6,
"Super Smoother: bass = 3",
"",
"");
TGraph * SmoothKern(TGraph *grin, Option_t *option="normal", Double_t bandwidth=0.5, Int_t nout=100, Double_t *xout=0)
Smooth data with Kernel smoother.
virtual TObject * DrawClone(Option_t *option="") const
Draw a clone of this object in the current selected pad for instance with: gROOT->SetSelectedPad(gPad...
TString & ReplaceAll(const TString &s1, const TString &s2)
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
tomato 1-D histogram with a float per channel (see TH1 documentation)}
virtual void SetYTitle(const char *title)
A helper class to smooth TGraph.
TGraph * SmoothSuper(TGraph *grin, Option_t *option="", Double_t bass=0, Double_t span=0, Bool_t isPeriodic=kFALSE, Double_t *w=0)
Smooth data with Super smoother.
virtual void Draw(Option_t *chopt="")
Draw this graph with its current attributes.
TGraph * SmoothLowess(TGraph *grin, Option_t *option="", Double_t span=0.67, Int_t iter=3, Double_t delta=0)
Smooth data with Lowess smoother.
TString & Append(const char *cs)
char * Form(const char *fmt,...)
virtual void SetTitleSize(Float_t size=0.02, Option_t *axis="X")
Set the axis' title size.
virtual void SetXTitle(const char *title)
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
A Graph is a graphics object made of two arrays X and Y with npoints each.
virtual void SetTitle(const char *title)
Change (i.e.
const char * Data() const