ROOT  6.06/09
Reference Guide
TGraphQQ.h
Go to the documentation of this file.
1 // @(#)root/graf:$Id$
2 // Author: Anna Kreshuk 18/11/2005
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2005, 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_TGraphQQ
13 #define ROOT_TGraphQQ
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TGraphQQ //
19 // //
20 // to create and to draw quantile-quantile plots //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #ifndef ROOT_TGraph
25 #include "TGraph.h"
26 #endif
27 
28 class TGraphQQ : public TGraph{
29 protected:
30  Int_t fNy0; //size of the fY0 dataset
31  Double_t fXq1; //x1 coordinate of the interquartile line
32  Double_t fXq2; //x2 coordinate of the interquartile line
33  Double_t fYq1; //y1 coordinate of the interquartile line
34  Double_t fYq2; //y2 coordinate of the interquartile line
35  Double_t *fY0; //!second dataset, if specified
36  TF1 *fF; //theoretical density function, if specified
37 
38  void Quartiles();
39  void MakeQuantiles();
40  void MakeFunctionQuantiles();
41 
42 public:
43  TGraphQQ();
45  TGraphQQ(Int_t n, Double_t *x, TF1 *f);
47  virtual ~TGraphQQ();
48 
49  void SetFunction(TF1 *f);
50  Double_t GetXq1() const {return fXq1;}
51  Double_t GetXq2() const {return fXq2;}
52  Double_t GetYq1() const {return fYq1;}
53  Double_t GetYq2() const {return fYq2;}
54  TF1 *GetF() const {return fF;}
55 
56  ClassDef(TGraphQQ, 1); // to create and to draw quantile-quantile plots
57 };
58 
59 #endif
const int nx
Definition: kalman.C:16
void MakeQuantiles()
When sample sizes are not equal, computes quantiles of the bigger sample by linear interpolation...
Definition: TGraphQQ.cxx:241
ClassDef(TGraphQQ, 1)
Int_t fNy0
Definition: TGraphQQ.h:30
void SetFunction(TF1 *f)
Sets the theoretical distribution function (density!) and computes its quantiles. ...
Definition: TGraphQQ.cxx:290
Double_t fXq1
Definition: TGraphQQ.h:31
void MakeFunctionQuantiles()
Computes quantiles of theoretical distribution function.
Definition: TGraphQQ.cxx:209
int Int_t
Definition: RtypesCore.h:41
Double_t GetXq1() const
Definition: TGraphQQ.h:50
TF1 * GetF() const
Definition: TGraphQQ.h:54
This class allows to draw quantile-quantile plots.
Definition: TGraphQQ.h:28
Double_t fXq2
Definition: TGraphQQ.h:32
Double_t x[n]
Definition: legend1.C:17
const int ny
Definition: kalman.C:17
Double_t * fY0
Definition: TGraphQQ.h:35
Double_t GetXq2() const
Definition: TGraphQQ.h:51
Double_t fYq2
Definition: TGraphQQ.h:34
virtual ~TGraphQQ()
Destroys a TGraphQQ.
Definition: TGraphQQ.cxx:198
double f(double x)
double Double_t
Definition: RtypesCore.h:55
Double_t y[n]
Definition: legend1.C:17
Double_t GetYq2() const
Definition: TGraphQQ.h:53
1-Dim function class
Definition: TF1.h:149
A Graph is a graphics object made of two arrays X and Y with npoints each.
Definition: TGraph.h:53
Double_t fYq1
Definition: TGraphQQ.h:33
void Quartiles()
compute quartiles a quartile is a 25 per cent or 75 per cent quantile
Definition: TGraphQQ.cxx:264
Double_t GetYq1() const
Definition: TGraphQQ.h:52
const Int_t n
Definition: legend1.C:16
TF1 * fF
second dataset, if specified
Definition: TGraphQQ.h:36