TGraphAsymmErrors


class description - source file - inheritance tree

class TGraphAsymmErrors : public TGraph


    public:
TGraphAsymmErrors TGraphAsymmErrors() TGraphAsymmErrors TGraphAsymmErrors(Int_t n) TGraphAsymmErrors TGraphAsymmErrors(Int_t n, Float_t* x, Float_t* y, Float_t* exl = 0, Float_t* exh = 0, Float_t* eyl = 0, Float_t* eyh = 0) TGraphAsymmErrors TGraphAsymmErrors(Int_t n, Double_t* x, Double_t* y, Double_t* exl = 0, Double_t* exh = 0, Double_t* eyl = 0, Double_t* eyh = 0) TGraphAsymmErrors TGraphAsymmErrors(TGraphAsymmErrors&) virtual void ~TGraphAsymmErrors() static TClass* Class() virtual void ComputeRange(Double_t& xmin, Double_t& ymin, Double_t& xmax, Double_t& ymax) virtual Double_t GetErrorX(Int_t bin) const virtual Double_t GetErrorY(Int_t bin) const Double_t* GetEXhigh() const Double_t* GetEXlow() const Double_t* GetEYhigh() const Double_t* GetEYlow() const virtual TClass* IsA() const virtual void Paint(Option_t* chopt) virtual void Print(Option_t* chopt) const virtual void SavePrimitive(ofstream& out, Option_t* option) virtual void SetPoint(Int_t i, Double_t x, Double_t y) virtual void SetPointError(Int_t i, Double_t exl, Double_t exh, Double_t eyl, Double_t eyh) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

protected:
Double_t* fEXlow [fNpoints] array of X low errors Double_t* fEXhigh [fNpoints] array of X high errors Double_t* fEYlow [fNpoints] array of Y low errors Double_t* fEYhigh [fNpoints] array of Y high errors

Class Description

   A TGraphAsymmErrors is a TGraph with assymetric error bars.
   The various format options to draw a TGraphAsymmErrors are explained in
     TGraphAsymmErrors::Paint.

  The picture below has been generated by the following macro:
------------------------------------------------------------------------
{
   gROOT->Reset();
   c1 = new TCanvas("c1","A Simple Graph with error bars",200,10,700,500);

   c1->SetFillColor(42);
   c1->SetGrid();
   c1->GetFrame()->SetFillColor(21);
   c1->GetFrame()->SetBorderSize(12);

   Int_t n = 10;
   Double_t x[n]  = {-0.22, 0.05, 0.25, 0.35, 0.5, 0.61,0.7,0.85,0.89,0.95};
   Double_t y[n]  = {1,2.9,5.6,7.4,9,9.6,8.7,6.3,4.5,1};
   Double_t exl[n] = {.05,.1,.07,.07,.04,.05,.06,.07,.08,.05};
   Double_t eyl[n] = {.8,.7,.6,.5,.4,.4,.5,.6,.7,.8};
   Double_t exh[n] = {.02,.08,.05,.05,.03,.03,.04,.05,.06,.03};
   Double_t eyh[n] = {.6,.5,.4,.3,.2,.2,.3,.4,.5,.6};
   gr = new TGraphAsymmErrors(n,x,y,exl,exh,eyl,eyh);
   gr->SetTitle("TGraphAsymmErrors Example");
   gr->SetMarkerColor(4);
   gr->SetMarkerStyle(21);
   gr->Draw("ALP");

   c1->Update();
}

/*

*/



TGraphAsymmErrors(): TGraph()
*-*-*-*-*-*-*-*-*-*-*TGraphAsymmErrors default constructor*-*-*-*-*-*-*-*-*-*-*-*
*-*                  =====================================

TGraphAsymmErrors(Int_t n) : TGraph(n)
*-*-*-*-*-*-*-*-*-*-*TGraphAsymmErrors normal constructor*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ====================================

  the arrays are preset to zero

TGraphAsymmErrors(Int_t n, Float_t *x, Float_t *y, Float_t *exl, Float_t *exh, Float_t *eyl, Float_t *eyh) : TGraph(n,x,y)
*-*-*-*-*-*-*-*-*-*-*TGraphAsymmErrors normal constructor*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ====================================

  if exl,h or eyl,h are null, the corresponding arrays are preset to zero

TGraphAsymmErrors(Int_t n, Double_t *x, Double_t *y, Double_t *exl, Double_t *exh, Double_t *eyl, Double_t *eyh) : TGraph(n,x,y)
*-*-*-*-*-*-*-*-*-*-*TGraphAsymmErrors normal constructor*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ====================================

  if exl,h or eyl,h are null, the corresponding arrays are preset to zero

~TGraphAsymmErrors()
*-*-*-*-*-*-*-*-*-*-*TGraphAsymmErrors default destructor*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ===============================

void ComputeRange(Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax)

Double_t GetErrorX(Int_t i) const
    This function is called by GraphFitChisquare.
    It returns the quadratic error along X at point i.

Double_t GetErrorY(Int_t i) const
    This function is called by GraphFitChisquare.
    It returns the quadratic error along Y at point i.

void Paint(Option_t *option)
 Paint this TGraphAsymmErrors with its current attributes

 by default horizonthal and vertical small lines are drawn at
 the end of the error bars. if option "z" or "Z" is specified,
 these lines are not drawn.

void Print(Option_t *) const
*-*-*-*-*-*-*-*-*-*-*Print graph and errors values*-*-*-*-*-*-*-*-*-*-*-*
*-*                  =============================


void SavePrimitive(ofstream &out, Option_t *option)
 Save primitive as a C++ statement(s) on output stream out

void SetPoint(Int_t i, Double_t x, Double_t y)
*-*-*-*-*-*-*-*-*-*-*Set x and y values for point number i*-*-*-*-*-*-*-*-*
*-*                  =====================================

void SetPointError(Int_t i, Double_t exl, Double_t exh, Double_t eyl, Double_t eyh)
*-*-*-*-*-*-*-*-*-*-*Set ex and ey values for point number i*-*-*-*-*-*-*-*
*-*                  =======================================

void Streamer(TBuffer &b)
 Stream an object of class TGraphAsymmErrors.



Inline Functions


                Double_t* GetEXlow() const
                Double_t* GetEXhigh() const
                Double_t* GetEYlow() const
                Double_t* GetEYhigh() const
                  TClass* Class()
                  TClass* IsA() const
                     void ShowMembers(TMemberInspector& insp, char* parent)
                     void StreamerNVirtual(TBuffer& b)
        TGraphAsymmErrors TGraphAsymmErrors(TGraphAsymmErrors&)


Author: Rene Brun 03/03/99
Last update: root/graf:$Name: $:$Id: TGraphAsymmErrors.cxx,v 1.7 2000/12/15 12:05:24 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - 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.