Create, draw and fit a TGraph2DErrors.
See the TGraph2DErrors documentation
␝lÚY␅
void gr011_graph2d_errorsfit()
{
TF2 *f2 =
new TF2(
"f2",
"1000*(([0]*sin(x)/x)*([1]*sin(y)/y))+200",-6,6,-6,6);
for (
Int_t i=0; i<nd; i++) {
if (z>zmax) zmax = z;
}
fit2->
SetTitle(
"Minuit fit result on the Graph2DErrors points");
}
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual Double_t Eval(Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
void SetTitle(const char *title="") override
Set the title of the TNamed.
virtual void SetMaximum(Double_t maximum=-1111)
virtual void SetParameters(const Double_t *params)
virtual void GetRandom2(Double_t &xrandom, Double_t &yrandom, TRandom *rng=nullptr)
void Draw(Option_t *option="") override
Default Draw method for all objects.
virtual void SetPointError(Int_t i, Double_t ex, Double_t ey, Double_t ez)
void SetPoint(Int_t i, Double_t x, Double_t y, Double_t z) override
TObject * FindObject(const char *name) const override
Must be redefined in derived classes.
virtual TFitResultPtr Fit(const char *formula, Option_t *option="", Option_t *goption="")
void Draw(Option_t *option="P0") override
Default Draw method for all objects.
This is the base class for the ROOT Random number generators.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
- Author
- Olivier Couet
Definition in file gr011_graph2d_errorsfit.C.