TGraphAsymmErrors


class description - source file - inheritance tree

class TGraphAsymmErrors : public TGraph


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

Data Members

protected:
Float_t* fEXlow array of X low errors Float_t* fEXhigh array of X high errors Float_t* fEYlow array of Y low errors Float_t* fEYhigh 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;
   Float_t x[n]  = {-0.22, 0.05, 0.25, 0.35, 0.5, 0.61,0.7,0.85,0.89,0.95};
   Float_t y[n]  = {1,2.9,5.6,7.4,9,9.6,8.7,6.3,4.5,1};
   Float_t exl[n] = {.05,.1,.07,.07,.04,.05,.06,.07,.08,.05};
   Float_t eyl[n] = {.8,.7,.6,.5,.4,.4,.5,.6,.7,.8};
   Float_t exh[n] = {.02,.08,.05,.05,.03,.03,.04,.05,.06,.03};
   Float_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, 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()
*-*-*-*-*-*-*-*-*-*-*TGraphAsymmErrors default destructor*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ===============================

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

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

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

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

void Print(Option_t *)
*-*-*-*-*-*-*-*-*-*-*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, Float_t x, Float_t y)
*-*-*-*-*-*-*-*-*-*-*Set x and y values for point number i*-*-*-*-*-*-*-*-*
*-*                  =====================================

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

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



Inline Functions


                 Float_t* GetEXlow()
                 Float_t* GetEXhigh()
                 Float_t* GetEYlow()
                 Float_t* GetEYhigh()
                  TClass* Class()
                  TClass* IsA()
                     void ShowMembers(TMemberInspector& insp, char* parent)
        TGraphAsymmErrors TGraphAsymmErrors(TGraphAsymmErrors&)


Author: Rene Brun 03/03/99
Last update: 2.22/07 05/07/99 14.52.25 by Rene Brun
Copyright (c) 1995-1999, The ROOT System, All rights reserved. *


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.