194 void SetTitle(
const char *title=
"")
override;
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
#define ClassDefOverride(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t format
Fill Area Attributes class.
Class to manage histogram axis.
Using a TBrowser one can browse all ROOT objects.
Collection abstract base class.
Provides an indirection to the TFitResult class and with a semantics identical to a TFitResult pointe...
A TGraph is an object made of two arrays X and Y with npoints each.
virtual Double_t GetPointX(Int_t i) const
Get x value for point i.
virtual void AddPoint(Double_t x, Double_t y)
Append a new point to the graph.
virtual Double_t Integral(Int_t first=0, Int_t last=-1) const
Integrate the TGraph data within a given (index) range.
Int_t fNpoints
Number of points <= fMaxSize.
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.
virtual void LeastSquareFit(Int_t m, Double_t *a, Double_t xmin=0, Double_t xmax=0)
Least squares polynomial fitting without weights.
virtual Double_t Chisquare(TF1 *f1, Option_t *option="") const
Return the chisquare of this graph with respect to f1.
void UseCurrentStyle() override
Set current style settings in this graph This function is called when either TCanvas::UseCurrentStyle...
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set x and y values for point number i.
virtual Int_t Merge(TCollection *list)
Adds all graphs from the collection to this graph.
Int_t fMaxSize
!Current dimension of arrays fX and fY
void SaveHistogramAndFunctions(std::ostream &out, const char *varname, Int_t &frameNumber, Option_t *option)
Save histogram and list of functions of TGraph as C++ statement Used in all TGraph-derived classes.
~TGraph() override
Graph default destructor.
Double_t ** ShrinkAndCopy(Int_t size, Int_t iend)
if size*2 <= fMaxSize allocate new arrays of size points, copy points [0,oend).
virtual Double_t GetRMS(Int_t axis=1) const
Return RMS of X (axis=1) or Y (axis=2)
virtual Double_t * GetEXhighd() const
virtual Bool_t IsEditable() const
TH1F * fHistogram
Pointer to histogram used for drawing axis.
void Paint(Option_t *chopt="") override
Draw this graph with its current attributes.
@ kNotEditable
Bit set if graph is non editable.
@ kIsHighlight
Bit set if graph is highlight.
@ kIsSortedX
Graph is sorted in X points.
@ kClipFrame
Clip to the frame boundary.
@ kResetHisto
fHistogram must be reset in GetHistogram
@ kNoStats
Don't draw stats box.
virtual Double_t GetErrorXlow(Int_t bin) const
It always returns a negative value.
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...
virtual Double_t GetErrorYlow(Int_t bin) const
It always returns a negative value.
virtual void UpdateArrays(const std::vector< Int_t > &sorting_indices, Int_t numSortedPoints, Int_t low)
Update the fX and fY arrays with the sorted values.
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 !...
Double_t GetMinimum() const
void Print(Option_t *chopt="") const override
Print graph values.
virtual Double_t * GetEYlow() const
virtual void SetMaximum(Double_t maximum=-1111)
Set the maximum of the graph.
virtual Double_t * GetEX() const
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.
static Bool_t CompareRadius(const TGraph *gr, Int_t left, Int_t right)
Return kTRUE if point number "left"'s distance to origin is bigger than that of point number "right".
virtual Double_t GetErrorYhigh(Int_t bin) const
It always returns a negative value.
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.
void SaveAs(const char *filename, Option_t *option="") const override
Save the graph as .csv, .tsv or .txt.
Double_t GetMaximum() const
TF1 * GetFunction(const char *name) const
Return pointer to function with name.
virtual Double_t * GetEXlowd() const
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.
Double_t * fY
[fNpoints] array of Y points
Bool_t CtorAllocate()
In constructors set fNpoints than call this method.
TString SaveArray(std::ostream &out, const char *suffix, Int_t frameNumber, Double_t *arr)
Save array as C++ code Returns name of created array.
virtual void DrawGraph(Int_t n, const Int_t *x, const Int_t *y, Option_t *option="")
Draw this graph with new attributes.
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.
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.
static Bool_t CompareArg(const TGraph *gr, Int_t left, Int_t right)
Return kTRUE if point number "left"'s argument (angle with respect to positive x-axis) is bigger than...
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.
char * GetObjectInfo(Int_t px, Int_t py) const override
Implementation to get information on point of graph at cursor position Adapted from class TH1.
Double_t ** AllocateArrays(Int_t Narrays, Int_t arraySize)
Allocate arrays.
virtual void Scale(Double_t c1=1., Option_t *option="y")
Multiply the values of a TGraph by a constant c1.
TList * fFunctions
Pointer to list of functions (fits and user)
virtual Double_t GetCovariance() const
Return covariance of vectors x,y.
virtual Double_t * GetEYlowd() const
static void SwapValues(Double_t *arr, Int_t pos1, Int_t pos2)
Swap values.
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.
virtual Double_t ** Allocate(Int_t newsize)
Allocate internal data structures for newsize points.
virtual void FitPanel()
Display a GUI panel with all graph fit options.
void Browse(TBrowser *b) override
Browse.
virtual Bool_t DoMerge(const TGraph *g)
protected function to perform the merge operation of a graph
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.
TList * GetListOfFunctions() const
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
virtual Double_t Eval(Double_t x, TSpline *spline=nullptr, Option_t *option="") const
Interpolate points in this graph at x using a TSpline.
virtual void InitExpo(Double_t xmin=0, Double_t xmax=0)
Compute Initial values of parameters for an exponential.
virtual Int_t RemovePoint()
Delete point close to the mouse position Returns index of removed point (or -1 if nothing was changed...
virtual void InitGaus(Double_t xmin=0, Double_t xmax=0)
Compute Initial values of parameters for a gaussian.
virtual Bool_t IsHighlight() const
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 ...
void SetName(const char *name="") override
Set graph name.
virtual void SetHighlight(Bool_t set=kTRUE)
Set highlight (enable/disble) mode for the graph by default highlight mode is disable.
virtual void SwapPoints(Int_t pos1, Int_t pos2)
Swap points.
virtual Double_t * GetEYhighd() const
TAxis * GetXaxis() const
Get x axis of the graph.
Bool_t GetEditable() const
Return kTRUE if kNotEditable bit is not set, kFALSE otherwise.
virtual Double_t * GetEXhigh() const
virtual Double_t GetCorrelationFactor() const
Return graph correlation factor.
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.
virtual Double_t * GetEYhigh() const
Double_t ** ExpandAndCopy(Int_t size, Int_t iend)
if size > fMaxSize allocate new arrays of 2*size points and copy iend first points.
virtual void Expand(Int_t newsize)
If array sizes <= newsize, expand storage to 2*newsize.
virtual Double_t GetMean(Int_t axis=1) const
Return mean value of X (axis=1) or Y (axis=2)
Double_t * fX
[fNpoints] array of X points
virtual void PaintStats(TF1 *fit)
Draw the stats.
TAxis * GetYaxis() const
Get y axis of the graph.
TObject * FindObject(const char *name) const override
Search object named name in the list of functions.
virtual void SetStats(Bool_t stats=kTRUE)
Set statistics option on/off.
virtual TH1F * GetHistogram() const
Returns a pointer to the histogram used to draw the axis Takes into account the two following cases.
virtual Double_t GetErrorY(Int_t bin) const
It always returns a negative value. Real implementation in TGraphErrors.
virtual Double_t * GetEY() const
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
virtual Double_t GetPointY(Int_t i) const
Get y value for point i.
virtual void SetHistogram(TH1F *h)
Double_t fMinimum
Minimum value for plotting along y.
void PaintGraph(Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt)
Draw the (x,y) as a graph.
void SetTitle(const char *title="") override
Change (i.e.
virtual Int_t InsertPoint()
Insert a new point at the mouse position.
virtual Double_t * GetEXlow() const
void RecursiveRemove(TObject *obj) override
Recursively remove object from the list of functions.
virtual void SetPointY(Int_t i, Double_t y)
Set y value for point i.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to a graph.
virtual void DrawPanel()
Display a panel with all graph drawing options.
void PaintGrapHist(Int_t npoints, const Double_t *x, const Double_t *y, Option_t *chopt)
Draw the (x,y) as a histogram.
void SetNameTitle(const char *name="", const char *title="") override
Set graph name and title.
virtual void SetPointX(Int_t i, Double_t x)
Set x value for point i.
virtual void Set(Int_t n)
Set number of points in the graph Existing coordinates are preserved New coordinates above fNpoints a...
virtual Int_t GetPoint(Int_t i, Double_t &x, Double_t &y) const
Get x and y values for point number i.
virtual void SetEditable(Bool_t editable=kTRUE)
if editable=kFALSE, the graph cannot be modified with the mouse by default a TGraph is editable
virtual void SetMinimum(Double_t minimum=-1111)
Set the minimum of the graph.
TGraph()
Graph default constructor.
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 !...
Double_t fMaximum
Maximum value for plotting along y.
virtual Double_t GetErrorXhigh(Int_t bin) const
It always returns a negative value.
TGraph & operator=(const TGraph &)
Equal operator for this graph.
virtual void InitPolynom(Double_t xmin=0, Double_t xmax=0)
Compute Initial values of parameters for a polynom.
virtual Double_t GetErrorX(Int_t bin) const
It always returns a negative value. Real implementation in TGraphErrors.
1-D histogram with a float per channel (see TH1 documentation)}
TH1 is the base class of all histogram classes in ROOT.
The TNamed class is the base class for all named ROOT classes.
Mother of all ROOT objects.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Base class for spline implementation containing the Draw/Paint methods.