library: libGraf
#include "TGraphQQ.h"

TGraphQQ


class description - header file - source file
viewCVS header - viewCVS source

class TGraphQQ: public TGraph

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
public:
TGraphQQ()
TGraphQQ(const TGraphQQ&)
TGraphQQ(Int_t n, Double_t* x)
TGraphQQ(Int_t n, Double_t* x, TF1* f)
TGraphQQ(Int_t nx, Double_t* x, Int_t ny, Double_t* y)
virtual~TGraphQQ()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTGraph::Apply(TF1* f)
virtual voidTGraph::Browse(TBrowser* b)
virtual Double_tTGraph::Chisquare(const TF1* f1) const
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
static Bool_tTGraph::CompareRadius(const TGraph* gr, Int_t left, Int_t right)
static Bool_tTGraph::CompareX(const TGraph* gr, Int_t left, Int_t right)
static Bool_tTGraph::CompareY(const TGraph* gr, Int_t left, Int_t right)
voidTGraph::ComputeLogs(Int_t npoints, Int_t opt)
virtual voidTGraph::ComputeRange(Double_t& xmin, Double_t& ymin, Double_t& xmax, Double_t& ymax) const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")
Int_tTAttLine::DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
virtual Int_tTGraph::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTGraph::Draw(Option_t* chopt = "")
virtual voidTObject::DrawClass() const
virtual TObject*TObject::DrawClone(Option_t* option = "") const
virtual voidTGraph::DrawGraph(Int_t n, const Int_t* x, const Int_t* y, Option_t* option = "")
virtual voidTGraph::DrawGraph(Int_t n, const Float_t* x, const Float_t* y, Option_t* option = "")
virtual voidTGraph::DrawGraph(Int_t n, const Double_t* x = 0, const Double_t* y = 0, Option_t* option = "")
virtual voidTGraph::DrawPanel()
virtual voidTObject::Dump() const
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual Double_tTGraph::Eval(Double_t x, TSpline* spline = 0, Option_t* option = "") const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTGraph::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTGraph::Expand(Int_t newsize)
virtual voidTGraph::Expand(Int_t newsize, Int_t step)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TGraph::FindObject(const char* name) const
virtual TObject*TGraph::FindObject(const TObject* obj) const
virtual Int_tTGraph::Fit(const char* formula, Option_t* option = "", Option_t* goption = "", Axis_t xmin = 0, Axis_t xmax = 0)
virtual Int_tTGraph::Fit(TF1* f1, Option_t* option = "", Option_t* goption = "", Axis_t xmin = 0, Axis_t xmax = 0)
virtual voidTGraph::FitPanel()
virtual Double_tTGraph::GetCorrelationFactor() const
virtual Double_tTGraph::GetCovariance() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Bool_tTGraph::GetEditable() const
virtual Double_tTGraph::GetErrorX(Int_t bin) const
virtual Double_tTGraph::GetErrorXhigh(Int_t bin) const
virtual Double_tTGraph::GetErrorXlow(Int_t bin) const
virtual Double_tTGraph::GetErrorY(Int_t bin) const
virtual Double_tTGraph::GetErrorYhigh(Int_t bin) const
virtual Double_tTGraph::GetErrorYlow(Int_t bin) const
virtual Double_t*TGraph::GetEX() const
virtual Double_t*TGraph::GetEXhigh() const
virtual Double_t*TGraph::GetEXlow() const
virtual Double_t*TGraph::GetEY() const
virtual Double_t*TGraph::GetEYhigh() const
virtual Double_t*TGraph::GetEYlow() const
virtual Color_tTAttFill::GetFillColor() const
virtual Style_tTAttFill::GetFillStyle() const
TF1*TGraph::GetFunction(const char* name) const
TH1F*TGraph::GetHistogram() const
virtual const char*TObject::GetIconName() const
virtual Color_tTAttLine::GetLineColor() const
virtual Style_tTAttLine::GetLineStyle() const
virtual Width_tTAttLine::GetLineWidth() const
TList*TGraph::GetListOfFunctions() const
virtual Color_tTAttMarker::GetMarkerColor() const
virtual Size_tTAttMarker::GetMarkerSize() const
virtual Style_tTAttMarker::GetMarkerStyle() const
Int_tTGraph::GetMaxSize() const
virtual Double_tTGraph::GetMean(Int_t axis = 1) const
Int_tTGraph::GetN() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual voidTGraph::GetPoint(Int_t i, Double_t& x, Double_t& y) const
virtual Double_tTGraph::GetRMS(Int_t axis = 1) const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
Double_t*TGraph::GetX() const
TAxis*TGraph::GetXaxis() const
Double_t*TGraph::GetY() const
TAxis*TGraph::GetYaxis() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTGraph::InitExpo(Double_t xmin = 0, Double_t xmax = 0)
virtual voidTGraph::InitGaus(Double_t xmin = 0, Double_t xmax = 0)
virtual voidTGraph::InitPolynom(Double_t xmin = 0, Double_t xmax = 0)
virtual Int_tTGraph::InsertPoint()
virtual voidTObject::Inspect() const
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTGraph::IsEditable() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
virtual Bool_tTAttFill::IsTransparent() const
Bool_tTObject::IsZombie() const
virtual voidTGraph::LeastSquareFit(Int_t m, Double_t* a, Double_t xmin = 0, Double_t xmax = 0)
virtual voidTGraph::LeastSquareLinearFit(Int_t n, Double_t& a0, Double_t& a1, Int_t& ifail, Double_t xmin = 0, Double_t xmax = 0)
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Int_tTGraph::Merge(TCollection* list)
virtual voidTAttLine::Modify()
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TGraphQQ&operator=(const TGraphQQ&)
virtual voidPaint(Option_t* opt = "")
virtual voidTGraph::PaintFit(TF1* fit)
virtual voidTGraph::PaintGraph(Int_t npoints, const Double_t* x, const Double_t* y, Option_t* option = "")
virtual voidTGraph::PaintGrapHist(Int_t npoints, const Double_t* x, const Double_t* y, Option_t* option = "")
virtual voidTGraph::PaintPolyLineHatches(Int_t n, const Double_t* x, const Double_t* y)
virtual voidTObject::Pop()
virtual voidTGraph::Print(Option_t* chopt = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual Int_tTGraph::RemovePoint()
virtual Int_tTGraph::RemovePoint(Int_t ipoint)
virtual voidTAttFill::ResetAttFill(Option_t* option = "")
virtual voidTAttLine::ResetAttLine(Option_t* option = "")
virtual voidTAttMarker::ResetAttMarker(Option_t* toption = "")
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") const
virtual voidTAttFill::SaveFillAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1001)
virtual voidTAttLine::SaveLineAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1, Int_t widdef = 1)
virtual voidTAttMarker::SaveMarkerAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1, Int_t sizdef = 1)
virtual voidTGraph::SavePrimitive(ostream& out, Option_t* option = "")
virtual voidTGraph::Set(Int_t n)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")
static voidTObject::SetDtorOnly(void* obj)
virtual voidTGraph::SetEditable(Bool_t editable = kTRUE)
virtual voidTAttFill::SetFillAttributes()
virtual voidTAttFill::SetFillColor(Color_t fcolor)
virtual voidTAttFill::SetFillStyle(Style_t fstyle)
voidSetFunction(TF1* f)
virtual voidTGraph::SetHistogram(TH1* h)
virtual voidTAttLine::SetLineAttributes()
virtual voidTAttLine::SetLineColor(Color_t lcolor)
virtual voidTAttLine::SetLineStyle(Style_t lstyle)
virtual voidTAttLine::SetLineWidth(Width_t lwidth)
virtual voidTAttMarker::SetMarkerAttributes()
virtual voidTAttMarker::SetMarkerColor(Color_t tcolor = 1)
virtual voidTAttMarker::SetMarkerSize(Size_t msize = 1)
virtual voidTAttMarker::SetMarkerStyle(Style_t mstyle = 1)
virtual voidTGraph::SetMaximum(Double_t maximum = -1111)
virtual voidTGraph::SetMinimum(Double_t minimum = -1111)
virtual voidTNamed::SetName(const char* name)
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTGraph::SetPoint(Int_t i, Double_t x, Double_t y)
virtual voidTGraph::SetTitle(const char* title = "")
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tTNamed::Sizeof() const
voidTGraph::Smooth(Int_t npoints, Double_t* x, Double_t* y, Int_t drawtype)
virtual voidTGraph::Sort(Bool_t (*)(const TGraph*, Int_t, Int_t) greater = &TGraph::CompareX, Bool_t ascending = kTRUE, Int_t low = 0, Int_t high = -1111)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTGraph::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0) const
voidTGraph::Zero(Int_t& k, Double_t AZ, Double_t BZ, Double_t E2, Double_t& X, Double_t& Y, Int_t maxiterations)
protected:
virtual Double_t**TGraph::Allocate(Int_t newsize)
Double_t**TGraph::AllocateArrays(Int_t Narrays, Int_t arraySize)
virtual voidTGraph::CopyAndRelease(Double_t** newarrays, Int_t ibegin, Int_t iend, Int_t obegin)
virtual Bool_tTGraph::CopyPoints(Double_t** newarrays, Int_t ibegin, Int_t iend, Int_t obegin)
Bool_tTGraph::CtorAllocate()
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
Double_t**TGraph::ExpandAndCopy(Int_t size, Int_t iend)
virtual voidTGraph::FillZero(Int_t begin, Int_t end, Bool_t from_ctor = kTRUE)
voidMakeFunctionQuantiles()
voidMakeQuantiles()
voidTObject::MakeZombie()
voidQuartiles()
Double_t**TGraph::ShrinkAndCopy(Int_t size, Int_t iend)
virtual voidTGraph::SwapPoints(Int_t pos1, Int_t pos2)
static voidTGraph::SwapValues(Double_t* arr, Int_t pos1, Int_t pos2)

Data Members

public:
enum TGraph::[unnamed] { kClipFrame
kNotEditable
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
Int_tfNy0size of the fY0 dataset
Double_tfXq1x1 coordinate of the interquartile line
Double_tfXq2x2 coordinate of the interquartile line
Double_tfYq1y1 coordinate of the interquartile line
Double_tfYq2y2 coordinate of the interquartile line
Double_t*fY0!second dataset, if specified
TF1*fFtheoretical density function, if specified
Int_tTGraph::fMaxSize!Current dimension of arrays fX and fY
Int_tTGraph::fNpointsNumber of points <= fMaxSize
Double_t*TGraph::fX[fNpoints] array of X points
Double_t*TGraph::fY[fNpoints] array of Y points
TList*TGraph::fFunctionsPointer to list of functions (fits and user)
TH1F*TGraph::fHistogramPointer to histogram used for drawing axis
Double_tTGraph::fMinimumMinimum value for plotting along y
Double_tTGraph::fMaximumMaximum value for plotting along y
TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title
Color_tTAttLine::fLineColorline color
Style_tTAttLine::fLineStyleline style
Width_tTAttLine::fLineWidthline width
Color_tTAttFill::fFillColorfill area color
Style_tTAttFill::fFillStylefill area style
Color_tTAttMarker::fMarkerColorMarker color index
Style_tTAttMarker::fMarkerStyleMarker style
Size_tTAttMarker::fMarkerSizeMarker size

Class Description


 This class allows to draw quantile-quantile plots
 
 Plots can be drawn for 2 datasets or for a dataset and a theoretical 
 distribution function
 
 2 datasets:
   Quantile-quantile plots are used to determine whether 2 samples come from
   the same distribution. 
   A qq-plot draws the quantiles of one dataset against the quantile of the 
   the other. The quantiles of the dataset with fewer entries are on Y axis,
   with more entries - on X axis. 
   A straight line, going through 0.25 and 0.75 quantiles is also plotted 
   for reference. It represents a robust linear fit, not sensitive to the 
   extremes of the datasets.
   If the datasets come from the same distribution, points of the plot should 
   fall approximately on the 45 degrees line. If they have the same 
   distribution function, but location or scale different parameters, 
   they should still fall on the straight line, but not the 45 degrees one. 
   The greater their departure from the straight line, the more evidence there
   is, that the datasets come from different distributions.
   The advantage of qq-plot is that it not only shows that the underlying
   distributions are different, but, unlike the analytical methods, it also
   gives information on the nature of this difference: heavier tails, 
   different location/scale, different shape, etc.
      
   Some examples of qqplots of 2 datasets:
/* */

 1 dataset: 
   Quantile-quantile plots are used to determine if the dataset comes from the 
   specified theoretical distribution, such as normal.
   A qq-plot draws quantiles of the dataset against quantiles of the specified
   theoretical distribution. 
   (NOTE, that density, not CDF should be specified)
   A straight line, going through 0.25 and 0.75 quantiles can also be plotted 
   for reference. It represents a robust linear fit, not sensitive to the 
   extremes of the dataset. 
   As in the 2 datasets case, departures from straight line indicate departures
   from the specified distribution.

   " The correlation coefficient associated with the linear fit to the data 
     in the probability plot (qq plot in our case) is a measure of the 
     goodness of the fit. 
     Estimates of the location and scale parameters  of the distribution 
     are given by the intercept and slope. Probability plots can be generated 
     for several competing distributions to see which provides the best fit, 
     and the probability plot generating the highest correlation coefficient 
     is the best choice since it generates the straightest probability plot."
   From "Engineering statistic handbook", 
   http://www.itl.nist.gov/div898/handbook/eda/section3/probplot.htm

   Example of a qq-plot of a dataset from N(3, 2) distribution and 
           TMath::Gaus(0, 1) theoretical function. Fitting parameters
           are estimates of the distribution mean and sigma.

/* */
   
   
 References:
 http://www.itl.nist.gov/div898/handbook/eda/section3/qqplot.htm
 http://www.itl.nist.gov/div898/handbook/eda/section3/probplot.htm
   
TGraphQQ()
default constructor
TGraphQQ(Int_t n, Double_t *x)
Creates a quantile-quantile plot of dataset x. 
Theoretical distribution function can be defined later by SetFunction method
TGraphQQ(Int_t n, Double_t *x, TF1 *f)
Creates a quantile-quantile plot of dataset x against function f
TGraphQQ(Int_t nx, Double_t *x, Int_t ny, Double_t *y)
Creates a quantile-quantile plot of dataset x against dataset y
Parameters nx and ny are respective array sizes
~TGraphQQ()
Destroys a TGraphQQ
void MakeFunctionQuantiles()
Computes quantiles of theoretical distribution function
void MakeQuantiles()
When sample sizes are not equal, computes quantiles of the bigger sample
by linear interpolation
void Quartiles()
 compute quartiles
 a quartile is a 25 per cent or 75 per cent quantile
void Paint(Option_t *opt)
 paint this graphQQ. No options for the time being
void SetFunction(TF1 *f)
Sets the theoretical distribution function (density!) 
and computes its quantiles
TGraphQQ()

Author: Anna Kreshuk 18/11/2005
Last update: root/graf:$Name: $:$Id: TGraphQQ.cxx,v 1.6 2006/06/26 13:05:16 brun Exp $
Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.