Logo ROOT   6.21/01
Reference Guide
TGraph.h
Go to the documentation of this file.
1 // @(#)root/hist:$Id$
2 // Author: Rene Brun, Olivier Couet 12/12/94
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TGraph
13 #define ROOT_TGraph
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TGraph //
19 // //
20 // Graph graphics class. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #include "TNamed.h"
25 #include "TAttLine.h"
26 #include "TAttFill.h"
27 #include "TAttMarker.h"
28 #include "TVectorFfwd.h"
29 #include "TVectorDfwd.h"
30 
31 class TBrowser;
32 class TAxis;
33 class TH1;
34 class TH1F;
35 class TCollection;
36 class TF1;
37 class TSpline;
38 
39 #include "TFitResultPtr.h"
40 
41 class TGraph : public TNamed, public TAttLine, public TAttFill, public TAttMarker {
42 
43 protected:
44 
45  Int_t fMaxSize; ///<!Current dimension of arrays fX and fY
46  Int_t fNpoints; ///< Number of points <= fMaxSize
47  Double_t *fX; ///<[fNpoints] array of X points
48  Double_t *fY; ///<[fNpoints] array of Y points
49  TList *fFunctions; ///< Pointer to list of functions (fits and user)
50  TH1F *fHistogram; ///< Pointer to histogram used for drawing axis
51  Double_t fMinimum; ///< Minimum value for plotting along y
52  Double_t fMaximum; ///< Maximum value for plotting along y
53 
54  static void SwapValues(Double_t* arr, Int_t pos1, Int_t pos2);
55  virtual void SwapPoints(Int_t pos1, Int_t pos2);
56 
57  virtual Double_t **Allocate(Int_t newsize);
58  Double_t **AllocateArrays(Int_t Narrays, Int_t arraySize);
59  virtual Bool_t CopyPoints(Double_t **newarrays, Int_t ibegin, Int_t iend, Int_t obegin);
60  virtual void CopyAndRelease(Double_t **newarrays, Int_t ibegin, Int_t iend, Int_t obegin);
62  Double_t **ExpandAndCopy(Int_t size, Int_t iend);
63  virtual void FillZero(Int_t begin, Int_t end, Bool_t from_ctor = kTRUE);
64  Double_t **ShrinkAndCopy(Int_t size, Int_t iend);
65  virtual Bool_t DoMerge(const TGraph * g);
66 
67 public:
68  // TGraph status bits
69  enum EStatusBits {
70  kClipFrame = BIT(10), ///< clip to the frame boundary
71  kResetHisto = BIT(17), ///< fHistogram must be reset in GetHistogram
72  kNotEditable = BIT(18), ///< bit set if graph is non editable
73  kIsSortedX = BIT(19), ///< graph is sorted in X points
74  kIsHighlight = BIT(20) ///< bit set if graph is highlight
75  };
76 
77  TGraph();
78  TGraph(Int_t n);
79  TGraph(Int_t n, const Int_t *x, const Int_t *y);
80  TGraph(Int_t n, const Float_t *x, const Float_t *y);
81  TGraph(Int_t n, const Double_t *x, const Double_t *y);
82  TGraph(const TGraph &gr);
83  TGraph& operator=(const TGraph&);
84  TGraph(const TVectorF &vx, const TVectorF &vy);
85  TGraph(const TVectorD &vx, const TVectorD &vy);
86  TGraph(const TH1 *h);
87  TGraph(const TF1 *f, Option_t *option="");
88  TGraph(const char *filename, const char *format="%lg %lg", Option_t *option="");
89  virtual ~TGraph();
90 
91  virtual void Apply(TF1 *f);
92  virtual void Browse(TBrowser *b);
93  virtual Double_t Chisquare(TF1 *f1, Option_t *option="") const;
94  static Bool_t CompareArg(const TGraph* gr, Int_t left, Int_t right);
95  static Bool_t CompareX(const TGraph* gr, Int_t left, Int_t right);
96  static Bool_t CompareY(const TGraph* gr, Int_t left, Int_t right);
97  static Bool_t CompareRadius(const TGraph* gr, Int_t left, Int_t right);
98  virtual void ComputeRange(Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax) const;
99  virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
100  virtual void Draw(Option_t *chopt="");
101  virtual void DrawGraph(Int_t n, const Int_t *x, const Int_t *y, Option_t *option="");
102  virtual void DrawGraph(Int_t n, const Float_t *x, const Float_t *y, Option_t *option="");
103  virtual void DrawGraph(Int_t n, const Double_t *x=0, const Double_t *y=0, Option_t *option="");
104  virtual void DrawPanel(); // *MENU*
105  virtual Double_t Eval(Double_t x, TSpline *spline=0, Option_t *option="") const;
106  virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
107  virtual void Expand(Int_t newsize);
108  virtual void Expand(Int_t newsize, Int_t step);
109  virtual TObject *FindObject(const char *name) const;
110  virtual TObject *FindObject(const TObject *obj) const;
111  virtual TFitResultPtr Fit(const char *formula ,Option_t *option="" ,Option_t *goption="", Axis_t xmin=0, Axis_t xmax=0); // *MENU*
112  virtual TFitResultPtr Fit(TF1 *f1 ,Option_t *option="" ,Option_t *goption="", Axis_t xmin=0, Axis_t xmax=0);
113  virtual void FitPanel(); // *MENU*
114  Bool_t GetEditable() const;
115  TF1 *GetFunction(const char *name) const;
116  TH1F *GetHistogram() const;
117  TList *GetListOfFunctions() const { return fFunctions; }
118  virtual Double_t GetCorrelationFactor() const;
119  virtual Double_t GetCovariance() const;
120  virtual Double_t GetMean(Int_t axis=1) const;
121  virtual Double_t GetRMS(Int_t axis=1) const;
122  Int_t GetMaxSize() const {return fMaxSize;}
123  Int_t GetN() const {return fNpoints;}
124  virtual Double_t GetErrorX(Int_t bin) const;
125  virtual Double_t GetErrorY(Int_t bin) const;
126  virtual Double_t GetErrorXhigh(Int_t bin) const;
127  virtual Double_t GetErrorXlow(Int_t bin) const;
128  virtual Double_t GetErrorYhigh(Int_t bin) const;
129  virtual Double_t GetErrorYlow(Int_t bin) const;
130  Double_t *GetX() const {return fX;}
131  Double_t *GetY() const {return fY;}
132  virtual Double_t *GetEX() const {return 0;}
133  virtual Double_t *GetEY() const {return 0;}
134  virtual Double_t *GetEXhigh() const {return 0;}
135  virtual Double_t *GetEXlow() const {return 0;}
136  virtual Double_t *GetEYhigh() const {return 0;}
137  virtual Double_t *GetEYlow() const {return 0;}
138  virtual Double_t *GetEXlowd() const {return 0;}
139  virtual Double_t *GetEXhighd() const {return 0;}
140  virtual Double_t *GetEYlowd() const {return 0;}
141  virtual Double_t *GetEYhighd() const {return 0;}
142  Double_t GetMaximum() const {return fMaximum;}
143  Double_t GetMinimum() const {return fMinimum;}
144  TAxis *GetXaxis() const ;
145  TAxis *GetYaxis() const ;
146  virtual char *GetObjectInfo(Int_t px, Int_t py) const;
147  virtual Int_t GetPoint(Int_t i, Double_t &x, Double_t &y) const;
148  virtual Double_t GetPointX(Int_t i) const;
149  virtual Double_t GetPointY(Int_t i) const;
150 
151  virtual void InitExpo(Double_t xmin=0, Double_t xmax=0);
152  virtual void InitGaus(Double_t xmin=0, Double_t xmax=0);
153  virtual void InitPolynom(Double_t xmin=0, Double_t xmax=0);
154  virtual Int_t InsertPoint(); // *MENU*
155  virtual void InsertPointBefore(Int_t ipoint, Double_t x, Double_t y);
156  virtual Double_t Integral(Int_t first=0, Int_t last=-1) const;
157  virtual Bool_t IsEditable() const {return !TestBit(kNotEditable);}
158  virtual Bool_t IsHighlight() const { return TestBit(kIsHighlight); }
159  virtual Int_t IsInside(Double_t x, Double_t y) const;
160  virtual void LeastSquareFit(Int_t m, Double_t *a, Double_t xmin=0, Double_t xmax=0);
161  virtual void LeastSquareLinearFit(Int_t n, Double_t &a0, Double_t &a1, Int_t &ifail, Double_t xmin=0, Double_t xmax=0);
162  virtual Int_t Merge(TCollection* list);
163  virtual void MovePoints(Double_t dx, Double_t dy, Bool_t logx = kFALSE, Bool_t logy = kFALSE);
164  virtual void Paint(Option_t *chopt="");
165  void PaintGraph(Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt);
166  void PaintGrapHist(Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt);
167  virtual void PaintStats(TF1 *fit);
168  virtual void Print(Option_t *chopt="") const;
169  virtual void RecursiveRemove(TObject *obj);
170  virtual Int_t RemovePoint(); // *MENU*
171  virtual Int_t RemovePoint(Int_t ipoint);
172  virtual void SavePrimitive(std::ostream &out, Option_t *option = "");
173  virtual void SetEditable(Bool_t editable=kTRUE); // *TOGGLE* *GETTER=GetEditable
174  virtual void SetHighlight(Bool_t set = kTRUE); // *TOGGLE* *GETTER=IsHighlight
175  virtual void SetHistogram(TH1F *h) {fHistogram = h;}
176  virtual void SetMaximum(Double_t maximum=-1111); // *MENU*
177  virtual void SetMinimum(Double_t minimum=-1111); // *MENU*
178  virtual void Set(Int_t n);
179  virtual void SetPoint(Int_t i, Double_t x, Double_t y);
180  virtual void SetPointX(Int_t i, Double_t x);
181  virtual void SetPointY(Int_t i, Double_t y);
182  virtual void SetName(const char *name=""); // *MENU*
183  virtual void SetNameTitle(const char *name="", const char *title="");
184  virtual void SetTitle(const char *title=""); // *MENU*
185  virtual void Sort(Bool_t (*greater)(const TGraph*, Int_t, Int_t)=&TGraph::CompareX,
186  Bool_t ascending=kTRUE, Int_t low=0, Int_t high=-1111);
187  virtual void UseCurrentStyle();
188  void Zero(Int_t &k,Double_t AZ,Double_t BZ,Double_t E2,Double_t &X,Double_t &Y,Int_t maxiterations);
189 
190  ClassDef(TGraph,4) //Graph graphics class
191 };
192 
193 #endif
virtual TFitResultPtr Fit(const char *formula, Option_t *option="", Option_t *goption="", Axis_t xmin=0, Axis_t xmax=0)
Fit this graph with function with name fname.
Definition: TGraph.cxx:1057
virtual Bool_t IsEditable() const
Definition: TGraph.h:157
void PaintGrapHist(Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt)
Draw the (x,y) as a histogram.
Definition: TGraph.cxx:2036
Int_t fNpoints
Number of points <= fMaxSize.
Definition: TGraph.h:46
virtual void SetPointY(Int_t i, Double_t y)
Set y value for point i.
Definition: TGraph.cxx:2289
virtual Double_t GetErrorYhigh(Int_t bin) const
This function is called by GraphFitChisquare.
Definition: TGraph.cxx:1442
virtual Double_t GetPointY(Int_t i) const
Get y value for point i.
Definition: TGraph.cxx:1608
float xmin
Definition: THbookFile.cxx:93
Double_t * fX
[fNpoints] array of X points
Definition: TGraph.h:47
virtual Double_t * GetEX() const
Definition: TGraph.h:132
virtual void FitPanel()
Display a GUI panel with all graph fit options.
Definition: TGraph.cxx:1315
virtual Double_t GetErrorY(Int_t bin) const
This function is called by GraphFitChisquare.
Definition: TGraph.cxx:1412
static Bool_t CompareRadius(const TGraph *gr, Int_t left, Int_t right)
Return kTRUE if point number "left"&#39;s distance to origin is bigger than that of point number "right"...
Definition: TGraph.cxx:644
auto * m
Definition: textangle.C:8
TGraph()
Graph default constructor.
Definition: TGraph.cxx:85
TF1 * GetFunction(const char *name) const
Return pointer to function with name.
Definition: TGraph.cxx:1463
virtual Double_t ** Allocate(Int_t newsize)
Allocate internal data structures for newsize points.
Definition: TGraph.cxx:530
void PaintGraph(Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt)
Draw the (x,y) as a graph.
Definition: TGraph.cxx:2027
float Float_t
Definition: RtypesCore.h:53
const char Option_t
Definition: RtypesCore.h:62
float ymin
Definition: THbookFile.cxx:93
virtual void InitPolynom(Double_t xmin=0, Double_t xmax=0)
Compute Initial values of parameters for a polynom.
Definition: TGraph.cxx:1730
virtual Double_t * GetEYlow() const
Definition: TGraph.h:137
#define g(i)
Definition: RSha256.hxx:105
double Axis_t
Definition: RtypesCore.h:72
virtual void SetMinimum(Double_t minimum=-1111)
Set the minimum of the graph.
Definition: TGraph.cxx:2248
virtual Double_t GetPointX(Int_t i) const
Get x value for point i.
Definition: TGraph.cxx:1597
#define BIT(n)
Definition: Rtypes.h:83
static Bool_t CompareX(const TGraph *gr, Int_t left, Int_t right)
Return kTRUE if fX[left] > fX[right]. Can be used by Sort.
Definition: TGraph.cxx:627
Base class for spline implementation containing the Draw/Paint methods.
Definition: TSpline.h:20
virtual Double_t * GetEXhighd() const
Definition: TGraph.h:139
TVectorT.
Definition: TMatrixTBase.h:79
virtual void SetPointX(Int_t i, Double_t x)
Set x value for point i.
Definition: TGraph.cxx:2281
TList * GetListOfFunctions() const
Definition: TGraph.h:117
TAxis * GetYaxis() const
Get y axis of the graph.
Definition: TGraph.cxx:1629
virtual Double_t * GetEY() const
Definition: TGraph.h:133
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition: TObject.h:172
virtual TObject * FindObject(const char *name) const
Search object named name in the list of functions.
Definition: TGraph.cxx:1030
1-D histogram with a float per channel (see TH1 documentation)}
Definition: TH1.h:571
virtual void DrawPanel()
Display a panel with all graph drawing options.
Definition: TGraph.cxx:850
virtual void LeastSquareFit(Int_t m, Double_t *a, Double_t xmin=0, Double_t xmax=0)
Least squares polynomial fitting without weights.
Definition: TGraph.cxx:1897
#define f(i)
Definition: RSha256.hxx:104
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual Double_t GetCovariance() const
Return covariance of vectors x,y.
Definition: TGraph.cxx:1349
TList * fFunctions
Pointer to list of functions (fits and user)
Definition: TGraph.h:49
virtual void SetTitle(const char *title="")
Change (i.e.
Definition: TGraph.cxx:2312
TH1F * fHistogram
Pointer to histogram used for drawing axis.
Definition: TGraph.h:50
virtual void RecursiveRemove(TObject *obj)
Recursively remove object from the list of functions.
Definition: TGraph.cxx:2064
virtual Double_t Integral(Int_t first=0, Int_t last=-1) const
Integrate the TGraph data within a given (index) range.
Definition: TGraph.cxx:1849
virtual Double_t GetErrorYlow(Int_t bin) const
This function is called by GraphFitChisquare.
Definition: TGraph.cxx:1452
virtual void Apply(TF1 *f)
Apply function f to all the data points f may be a 1-D function TF1 or 2-d function TF2 The Y values ...
Definition: TGraph.cxx:560
virtual void Draw(Option_t *chopt="")
Draw this graph with its current attributes.
Definition: TGraph.cxx:753
virtual Int_t Merge(TCollection *list)
Adds all graphs from the collection to this graph.
Definition: TGraph.cxx:2535
Marker Attributes class.
Definition: TAttMarker.h:19
virtual Bool_t CopyPoints(Double_t **newarrays, Int_t ibegin, Int_t iend, Int_t obegin)
Copy points from fX and fY to arrays[0] and arrays[1] or to fX and fY if arrays == 0 and ibegin != ie...
Definition: TGraph.cxx:701
Double_t ** ShrinkAndCopy(Int_t size, Int_t iend)
if size*2 <= fMaxSize allocate new arrays of size points, copy points [0,oend).
Definition: TGraph.cxx:2344
Fill Area Attributes class.
Definition: TAttFill.h:19
Double_t x[n]
Definition: legend1.C:17
virtual void Paint(Option_t *chopt="")
Draw this graph with its current attributes.
Definition: TGraph.cxx:2018
#define ClassDef(name, id)
Definition: Rtypes.h:326
virtual Bool_t IsHighlight() const
Definition: TGraph.h:158
virtual Double_t Chisquare(TF1 *f1, Option_t *option="") const
Return the chisquare of this graph with respect to f1.
Definition: TGraph.cxx:599
TGraph & operator=(const TGraph &)
Equal operator for this graph.
Definition: TGraph.cxx:186
virtual void SetName(const char *name="")
Set graph name.
Definition: TGraph.cxx:2296
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
virtual void Sort(Bool_t(*greater)(const TGraph *, Int_t, Int_t)=&TGraph::CompareX, Bool_t ascending=kTRUE, Int_t low=0, Int_t high=-1111)
Sorts the points of this TGraph using in-place quicksort (see e.g.
Definition: TGraph.cxx:2377
virtual void Print(Option_t *chopt="") const
Print graph values.
Definition: TGraph.cxx:2054
virtual void SetMaximum(Double_t maximum=-1111)
Set the maximum of the graph.
Definition: TGraph.cxx:2239
void Zero(Int_t &k, Double_t AZ, Double_t BZ, Double_t E2, Double_t &X, Double_t &Y, Int_t maxiterations)
Find zero of a continuous function.
Definition: TGraph.cxx:2594
virtual Double_t GetErrorX(Int_t bin) const
This function is called by GraphFitChisquare.
Definition: TGraph.cxx:1403
Double_t fMinimum
Minimum value for plotting along y.
Definition: TGraph.h:51
virtual Double_t Eval(Double_t x, TSpline *spline=0, Option_t *option="") const
Interpolate points in this graph at x using a TSpline.
Definition: TGraph.cxx:871
virtual Int_t RemovePoint()
Delete point close to the mouse position.
Definition: TGraph.cxx:2075
virtual void SetNameTitle(const char *name="", const char *title="")
Set graph name and title.
Definition: TGraph.cxx:2332
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
Definition: TGraph.cxx:974
A doubly linked list.
Definition: TList.h:44
virtual void Expand(Int_t newsize)
If array sizes <= newsize, expand storage to 2*newsize.
Definition: TGraph.cxx:983
Bool_t CtorAllocate()
In constructors set fNpoints than call this method.
Definition: TGraph.cxx:727
virtual Double_t * GetEYhighd() const
Definition: TGraph.h:141
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
Definition: TGraph.cxx:2112
float ymax
Definition: THbookFile.cxx:93
virtual Double_t GetErrorXlow(Int_t bin) const
This function is called by GraphFitChisquare.
Definition: TGraph.cxx:1432
virtual Int_t GetPoint(Int_t i, Double_t &x, Double_t &y) const
Get x and y values for point number i.
Definition: TGraph.cxx:1586
virtual void SwapPoints(Int_t pos1, Int_t pos2)
Swap points.
Definition: TGraph.cxx:2479
Class to manage histogram axis.
Definition: TAxis.h:30
auto * a
Definition: textangle.C:12
Provides an indirection to the TFitResult class and with a semantics identical to a TFitResult pointe...
Definition: TFitResultPtr.h:31
static void SwapValues(Double_t *arr, Int_t pos1, Int_t pos2)
Swap values.
Definition: TGraph.cxx:2488
Collection abstract base class.
Definition: TCollection.h:63
virtual Bool_t DoMerge(const TGraph *g)
protected function to perform the merge operation of a graph
Definition: TGraph.cxx:2553
fHistogram must be reset in GetHistogram
Definition: TGraph.h:71
bit set if graph is highlight
Definition: TGraph.h:74
virtual Int_t InsertPoint()
Insert a new point at the mouse position.
Definition: TGraph.cxx:1750
Int_t GetN() const
Definition: TGraph.h:123
float xmax
Definition: THbookFile.cxx:93
Bool_t GetEditable() const
Return kTRUE if kNotEditable bit is not set, kFALSE otherwise.
Definition: TGraph.cxx:2207
virtual Double_t GetRMS(Int_t axis=1) const
Return RMS of X (axis=1) or Y (axis=2)
Definition: TGraph.cxx:1380
Double_t GetMaximum() const
Definition: TGraph.h:142
TGraphErrors * gr
Definition: legend1.C:25
#define h(i)
Definition: RSha256.hxx:106
TAxis * GetXaxis() const
Get x axis of the graph.
Definition: TGraph.cxx:1619
const Bool_t kFALSE
Definition: RtypesCore.h:88
Double_t * GetX() const
Definition: TGraph.h:130
virtual Double_t * GetEXlowd() const
Definition: TGraph.h:138
virtual void InsertPointBefore(Int_t ipoint, Double_t x, Double_t y)
Insert a new point with coordinates (x,y) before the point number ipoint.
Definition: TGraph.cxx:1795
virtual void InitGaus(Double_t xmin=0, Double_t xmax=0)
Compute Initial values of parameters for a gaussian.
Definition: TGraph.cxx:1671
virtual Double_t * GetEYlowd() const
Definition: TGraph.h:140
virtual Double_t GetMean(Int_t axis=1) const
Return mean value of X (axis=1) or Y (axis=2)
Definition: TGraph.cxx:1365
TH1F * GetHistogram() const
Returns a pointer to the histogram used to draw the axis Takes into account the two following cases...
Definition: TGraph.cxx:1475
double Double_t
Definition: RtypesCore.h:55
virtual void PaintStats(TF1 *fit)
Draw the stats.
Definition: TGraph.cxx:2045
virtual Double_t * GetEXlow() const
Definition: TGraph.h:135
EStatusBits
Definition: TObject.h:57
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a graph.
Definition: TGraph.cxx:797
graph is sorted in X points
Definition: TGraph.h:73
Double_t y[n]
Definition: legend1.C:17
The TH1 histogram class.
Definition: TH1.h:56
virtual ~TGraph()
Graph default destructor.
Definition: TGraph.cxx:506
Double_t fMaximum
Maximum value for plotting along y.
Definition: TGraph.h:52
Double_t ** ExpandAndCopy(Int_t size, Int_t iend)
if size > fMaxSize allocate new arrays of 2*size points and copy iend first points.
Definition: TGraph.cxx:1007
Mother of all ROOT objects.
Definition: TObject.h:37
virtual void UseCurrentStyle()
Set current style settings in this graph This function is called when either TCanvas::UseCurrentStyle...
Definition: TGraph.cxx:2500
virtual void Browse(TBrowser *b)
Browse.
Definition: TGraph.cxx:573
virtual void FillZero(Int_t begin, Int_t end, Bool_t from_ctor=kTRUE)
Set zero values for point arrays in the range [begin, end) Should be redefined in descendant classes...
Definition: TGraph.cxx:1021
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set x and y values for point number i.
Definition: TGraph.cxx:2257
Double_t * fY
[fNpoints] array of Y points
Definition: TGraph.h:48
Double_t * GetY() const
Definition: TGraph.h:131
virtual void InitExpo(Double_t xmin=0, Double_t xmax=0)
Compute Initial values of parameters for an exponential.
Definition: TGraph.cxx:1709
virtual void LeastSquareLinearFit(Int_t n, Double_t &a0, Double_t &a1, Int_t &ifail, Double_t xmin=0, Double_t xmax=0)
Least square linear fit without weights.
Definition: TGraph.cxx:1972
static Bool_t CompareArg(const TGraph *gr, Int_t left, Int_t right)
Return kTRUE if point number "left"&#39;s argument (angle with respect to positive x-axis) is bigger than...
Definition: TGraph.cxx:616
1-Dim function class
Definition: TF1.h:211
A TGraph is an object made of two arrays X and Y with npoints each.
Definition: TGraph.h:41
TF1 * f1
Definition: legend1.C:11
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
virtual void SetHighlight(Bool_t set=kTRUE)
Set highlight (enable/disble) mode for the graph by default highlight mode is disable.
Definition: TGraph.cxx:2226
virtual void CopyAndRelease(Double_t **newarrays, Int_t ibegin, Int_t iend, Int_t obegin)
Copy points from fX and fY to arrays[0] and arrays[1] or to fX and fY if arrays == 0 and ibegin != ie...
Definition: TGraph.cxx:684
virtual void SetHistogram(TH1F *h)
Definition: TGraph.h:175
Int_t GetMaxSize() const
Definition: TGraph.h:122
virtual void DrawGraph(Int_t n, const Int_t *x, const Int_t *y, Option_t *option="")
Draw this graph with new attributes.
Definition: TGraph.cxx:807
virtual void MovePoints(Double_t dx, Double_t dy, Bool_t logx=kFALSE, Bool_t logy=kFALSE)
Move all graph points on specified values dx,dy If log argument specified, calculation done in logari...
Definition: TGraph.cxx:2568
virtual Double_t GetCorrelationFactor() const
Return graph correlation factor.
Definition: TGraph.cxx:1337
Definition: first.py:1
Int_t fMaxSize
!Current dimension of arrays fX and fY
Definition: TGraph.h:45
virtual Int_t IsInside(Double_t x, Double_t y) const
Return 1 if the point (x,y) is inside the polygon defined by the graph vertices 0 otherwise...
Definition: TGraph.cxx:1882
virtual Double_t * GetEYhigh() const
Definition: TGraph.h:136
virtual void ComputeRange(Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax) const
Compute the x/y range of the points in this graph.
Definition: TGraph.cxx:653
virtual void Set(Int_t n)
Set number of points in the graph Existing coordinates are preserved New coordinates above fNpoints a...
Definition: TGraph.cxx:2192
Double_t GetMinimum() const
Definition: TGraph.h:143
virtual void SetEditable(Bool_t editable=kTRUE)
if editable=kFALSE, the graph cannot be modified with the mouse by default a TGraph is editable ...
Definition: TGraph.cxx:2216
const Bool_t kTRUE
Definition: RtypesCore.h:87
Double_t ** AllocateArrays(Int_t Narrays, Int_t arraySize)
Allocate arrays.
Definition: TGraph.cxx:537
const Int_t n
Definition: legend1.C:16
virtual Double_t GetErrorXhigh(Int_t bin) const
This function is called by GraphFitChisquare.
Definition: TGraph.cxx:1422
Line Attributes class.
Definition: TAttLine.h:18
clip to the frame boundary
Definition: TGraph.h:70
char name[80]
Definition: TGX11.cxx:109
virtual Double_t * GetEXhigh() const
Definition: TGraph.h:134
bit set if graph is non editable
Definition: TGraph.h:72
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Implementation to get information on point of graph at cursor position Adapted from class TH1...
Definition: TGraph.cxx:1640
static Bool_t CompareY(const TGraph *gr, Int_t left, Int_t right)
Return kTRUE if fY[left] > fY[right]. Can be used by Sort.
Definition: TGraph.cxx:635