ROOT logo
// @(#)root/hist:$Id: TMultiGraph.cxx 26029 2008-10-31 10:15:46Z couet $
// Author: Rene Brun   12/10/2000

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include "TROOT.h"
#include "TMultiGraph.h"
#include "TGraph.h"
#include "TH1.h"
#include "TVirtualPad.h"
#include "Riostream.h"
#include "TVirtualFitter.h"
#include "TPluginManager.h"
#include "TClass.h"
#include "TMath.h"
#include "TSystem.h"
#include <stdlib.h>

#include <ctype.h>

extern void H1LeastSquareSeqnd(Int_t n, Double_t *a, Int_t idim, Int_t &ifail, Int_t k, Double_t *b);

ClassImp(TMultiGraph)


//______________________________________________________________________________
/* Begin_Html
<center><h2>TMultiGraph class</h2></center>
A TMultiGraph is a collection of TGraph (or derived) objects
Use <tt>TMultiGraph::Add</tt> to add a new graph to the list.
The TMultiGraph owns the objects in the list.
Drawing options are the same as for TGraph.
<p>
Example:
<pre>
     TGraph *gr1 = new TGraph(...
     TGraphErrors *gr2 = new TGraphErrors(...
     TMultiGraph *mg = new TMultiGraph();
     mg->Add(gr1,"lp");
     mg->Add(gr2,"cp");
     mg->Draw("a");
</pre>
The drawing option for each TGraph may be specified as an optional
second argument of the Add function.
If a draw option is specified, it will be used to draw the graph,
otherwise the graph will be drawn with the option specified in
<tt>TMultiGraph::Draw</tt>.
End_Html */


//______________________________________________________________________________
TMultiGraph::TMultiGraph(): TNamed()
{
   // TMultiGraph default constructor

   fGraphs    = 0;
   fFunctions = 0;
   fHistogram = 0;
   fMaximum   = -1111;
   fMinimum   = -1111;
}


//______________________________________________________________________________
TMultiGraph::TMultiGraph(const char *name, const char *title)
       : TNamed(name,title)
{
   // constructor with name and title

   fGraphs    = 0;
   fFunctions = 0;
   fHistogram = 0;
   fMaximum   = -1111;
   fMinimum   = -1111;
}


//______________________________________________________________________________
TMultiGraph::TMultiGraph(const TMultiGraph& mg) :
  TNamed (mg),
  fGraphs(mg.fGraphs),
  fFunctions(mg.fFunctions),
  fHistogram(mg.fHistogram),
  fMaximum(mg.fMaximum),
  fMinimum(mg.fMinimum)
{
   //copy constructor
}


//______________________________________________________________________________
TMultiGraph& TMultiGraph::operator=(const TMultiGraph& mg)
{
   //assignement operator
   if(this!=&mg) {
      TNamed::operator=(mg);
      fGraphs=mg.fGraphs;
      fFunctions=mg.fFunctions;
      fHistogram=mg.fHistogram;
      fMaximum=mg.fMaximum;
      fMinimum=mg.fMinimum;
   }
   return *this;
}


//______________________________________________________________________________
TMultiGraph::~TMultiGraph()
{
   // TMultiGraph destructor

   if (!fGraphs) return;
   TGraph *g;
   TIter   next(fGraphs);
   while ((g = (TGraph*) next())) {
      g->ResetBit(kMustCleanup);
   }
   fGraphs->Delete();
   delete fGraphs;
   fGraphs = 0;
   delete fHistogram;
   fHistogram = 0;
   if (fFunctions) {
      fFunctions->SetBit(kInvalidObject);
      //special logic to support the case where the same object is
      //added multiple times in fFunctions.
      //This case happens when the same object is added with different
      //drawing modes
      TObject *obj;
      while ((obj  = fFunctions->First())) {
         while(fFunctions->Remove(obj)) { }
         delete obj;
      }
      delete fFunctions;
   }
}


//______________________________________________________________________________
void TMultiGraph::Add(TGraph *graph, Option_t *chopt)
{
   // add a new graph to the list of graphs
   // note that the graph is now owned by the TMultigraph.
   // Deleting the TMultiGraph object will automatically delete the graphs.
   // You should not delete the graphs when the TMultigraph is still active.

   if (!fGraphs) fGraphs = new TList();
   graph->SetBit(kMustCleanup);
   fGraphs->Add(graph,chopt);
}


//______________________________________________________________________________
void TMultiGraph::Add(TMultiGraph *multigraph, Option_t *chopt)
{
   // add all the graphs in "multigraph" to the list of graphs.

   TList *graphlist = multigraph->GetListOfGraphs();
   if (!graphlist) return;

   if (!fGraphs) fGraphs = new TList();

   TGraph *gr;
   gr = (TGraph*)graphlist->First();
   fGraphs->Add(gr,chopt);
   for(Int_t i = 1; i < graphlist->GetSize(); i++){
      gr = (TGraph*)graphlist->After(gr);
      fGraphs->Add(gr,chopt);
   }
}


//______________________________________________________________________________
void TMultiGraph::Browse(TBrowser *)
{
   // Browse multigraph.

   Draw("alp");
   gPad->Update();
}


//______________________________________________________________________________
Int_t TMultiGraph::DistancetoPrimitive(Int_t px, Int_t py)
{
   // Compute distance from point px,py to each graph

   // Are we on the axis?
   const Int_t kMaxDiff = 10;
   Int_t distance = 9999;
   if (fHistogram) {
      distance = fHistogram->DistancetoPrimitive(px,py);
      if (distance <= 0) return distance;
   }

   // Loop on the list of graphs
   if (!fGraphs) return distance;
   TGraph *g;
   TIter   next(fGraphs);
   while ((g = (TGraph*) next())) {
      Int_t dist = g->DistancetoPrimitive(px,py);
      if (dist <= 0) return 0;
      if (dist < kMaxDiff) {gPad->SetSelected(g); return dist;}
   }
   return distance;
}


//______________________________________________________________________________
void TMultiGraph::Draw(Option_t *option)
{
   // Draw this multigraph with its current attributes.
   //
   //   Options to draw a graph are described in TGraph::PainGraph
   //
   //  The drawing option for each TGraph may be specified as an optional
   //  second argument of the Add function. You can use GetGraphDrawOption
   //  to return this option.
   //  If a draw option is specified, it will be used to draw the graph,
   //  otherwise the graph will be drawn with the option specified in
   //  TMultiGraph::Draw. Use GetDrawOption to return the option specified
   //  when drawin the TMultiGraph.

   if (!fGraphs) {
      Error("Draw", "Cannot draw an empty TMultiGraph");
      return;
   }
   AppendPad(option);
}


//______________________________________________________________________________
Int_t TMultiGraph::Fit(const char *fname, Option_t *option, Option_t *, Axis_t xmin, Axis_t xmax)
{
   // Fit this graph with function with name fname.
   //
   //  interface to TF1::Fit(TF1 *f1...

   char *linear;
   linear= (char*)strstr(fname, "++");
   TF1 *f1=0;
   if (linear)
      f1=new TF1(fname, fname, xmin, xmax);
   else {
      f1 = (TF1*)gROOT->GetFunction(fname);
      if (!f1) { Printf("Unknown function: %s",fname); return -1; }
   }

   return Fit(f1,option,"",xmin,xmax);
}


//______________________________________________________________________________
Int_t TMultiGraph::Fit(TF1 *f1, Option_t *option, Option_t *goption, Axis_t rxmin, Axis_t rxmax)
{
   // Fit this multigraph with function f1.
   //
   //   In this function all graphs of the multigraph are fitted simultaneously
   //
   //   f1 is an already predefined function created by TF1.
   //   Predefined functions such as gaus, expo and poln are automatically
   //   created by ROOT.
   //
   //   The list of fit options is given in parameter option.
   //      option = "W"  Set all errors to 1
   //             = "U" Use a User specified fitting algorithm (via SetFCN)
   //             = "Q" Quiet mode (minimum printing)
   //             = "V" Verbose mode (default is between Q and V)
   //             = "B" Use this option when you want to fix one or more parameters
   //                   and the fitting function is like "gaus","expo","poln","landau".
   //             = "R" Use the Range specified in the function range
   //             = "N" Do not store the graphics function, do not draw
   //             = "0" Do not plot the result of the fit. By default the fitted function
   //                   is drawn unless the option"N" above is specified.
   //             = "+" Add this new fitted function to the list of fitted functions
   //                   (by default, any previous function is deleted)
   //             = "C" In case of linear fitting, not calculate the chisquare
   //                    (saves time)
   //             = "F" If fitting a polN, switch to minuit fitter
   //             = "ROB" In case of linear fitting, compute the LTS regression
   //                     coefficients (robust(resistant) regression), using
   //                     the default fraction of good points
   //               "ROB=0.x" - compute the LTS regression coefficients, using
   //                           0.x as a fraction of good points
   //
   //   When the fit is drawn (by default), the parameter goption may be used
   //   to specify a list of graphics options. See TGraph::Paint for a complete
   //   list of these options.
   //
   //   In order to use the Range option, one must first create a function
   //   with the expression to be fitted. For example, if your graph
   //   has a defined range between -4 and 4 and you want to fit a gaussian
   //   only in the interval 1 to 3, you can do:
   //        TF1 *f1 = new TF1("f1","gaus",1,3);
   //        graph->Fit("f1","R");
   //
   //
   //   who is calling this function
   //   ============================
   //   Note that this function is called when calling TGraphErrors::Fit
   //   or TGraphAsymmErrors::Fit ot TGraphBentErrors::Fit
   //   see the discussion below on the errors calulation.
   //
   //   Setting initial conditions
   //   ==========================
   //   Parameters must be initialized before invoking the Fit function.
   //   The setting of the parameter initial values is automatic for the
   //   predefined functions : poln, expo, gaus, landau. One can however disable
   //   this automatic computation by specifying the option "B".
   //   You can specify boundary limits for some or all parameters via
   //        f1->SetParLimits(p_number, parmin, parmax);
   //   if parmin>=parmax, the parameter is fixed
   //   Note that you are not forced to fix the limits for all parameters.
   //   For example, if you fit a function with 6 parameters, you can do:
   //     func->SetParameters(0,3.1,1.e-6,0.1,-8,100);
   //     func->SetParLimits(4,-10,-4);
   //     func->SetParLimits(5, 1,1);
   //   With this setup, parameters 0->3 can vary freely
   //   Parameter 4 has boundaries [-10,-4] with initial value -8
   //   Parameter 5 is fixed to 100.
   //
   //  Fit range
   //  =========
   //  The fit range can be specified in two ways:
   //    - specify rxmax > rxmin (default is rxmin=rxmax=0)
   //    - specify the option "R". In this case, the function will be taken
   //      instead of the full graph range.
   //
   //   Changing the fitting function
   //   =============================
   //  By default the fitting function GraphFitChisquare is used.
   //  To specify a User defined fitting function, specify option "U" and
   //  call the following functions:
   //    TVirtualFitter::Fitter(mygraph)->SetFCN(MyFittingFunction)
   //  where MyFittingFunction is of type:
   //  extern void MyFittingFunction(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag);
   //
   //  How errors are used in the chisquare function (see TFitter GraphFitChisquare)//   Access to the fit results
   //   ============================================
   // In case of a TGraphErrors object, ex, the error along x,  is projected
   // along the y-direction by calculating the function at the points x-exlow and
   // x+exhigh.
   //
   // The chisquare is computed as the sum of the quantity below at each point:
   //
   //                     (y - f(x))**2
   //         -----------------------------------
   //         ey**2 + ((f(x+exhigh) - f(x-exlow))/2)**2
   //
   // where x and y are the point coordinates.
   //
   // In case the function lies below (above) the data point, ey is ey_low (ey_high).
   //
   //  thanks to Andy Haas (haas@yahoo.com) for adding the case with TGraphasymmerrors
   //            University of Washington
   //
   // a little different approach to approximating the uncertainty in y because of the
   // errors in x, is to make it equal the error in x times the slope of the line.
   // The improvement, compared to the first method (f(x+ exhigh) - f(x-exlow))/2
   // is of (error of x)**2 order. This approach is called "effective variance method".
   // This improvement has been made in version 4.00/08 by Anna Kreshuk.
   //
   //   Associated functions
   //   ====================
   //  One or more object (typically a TF1*) can be added to the list
   //  of functions (fFunctions) associated to each graph.
   //  When TGraph::Fit is invoked, the fitted function is added to this list.
   //  Given a graph gr, one can retrieve an associated function
   //  with:  TF1 *myfunc = gr->GetFunction("myfunc");
   //
   //  If the graph is made persistent, the list of
   //  associated functions is also persistent. Given a pointer (see above)
   //  to an associated function myfunc, one can retrieve the function/fit
   //  parameters with calls such as:
   //    Double_t chi2 = myfunc->GetChisquare();
   //    Double_t par0 = myfunc->GetParameter(0); //value of 1st parameter
   //    Double_t err0 = myfunc->GetParError(0);  //error on first parameter
   //
   //   Fit Statistics
   //   ==============
   //  You can change the statistics box to display the fit parameters with
   //  the TStyle::SetOptFit(mode) method. This mode has four digits.
   //  mode = pcev  (default = 0111)
   //    v = 1;  print name/values of parameters
   //    e = 1;  print errors (if e=1, v must be 1)
   //    c = 1;  print Chisquare/Number of degress of freedom
   //    p = 1;  print Probability
   //
   //  For example: gStyle->SetOptFit(1011);
   //  prints the fit probability, parameter names/values, and errors.
   //  You can change the position of the statistics box with these lines
   //  (where g is a pointer to the TGraph):
   //
   //  Root > TPaveStats *st = (TPaveStats*)g->GetListOfFunctions()->FindObject("stats")
   //  Root > st->SetX1NDC(newx1); //new x start position
   //  Root > st->SetX2NDC(newx2); //new x end position

   return DoFit(f1,option,goption,rxmin,rxmax);  // implemented in HFitImpl.cxx

}

//______________________________________________________________________________
void TMultiGraph::FitPanel()
{
//   -*-*-*-*-*Display a panel with all histogram fit options*-*-*-*-*-*
//             ==============================================
//
//      See class TFitPanel for example

   if (!gPad)
      gROOT->MakeDefCanvas();

   if (!gPad) {
      Error("FitPanel", "Unable to create a default canvas");
      return;
   }

   // use plugin manager to create instance of TFitEditor
   TPluginHandler *handler = gROOT->GetPluginManager()->FindHandler("TFitEditor");
   if (handler && handler->LoadPlugin() != -1) {
      if (handler->ExecPlugin(2, gPad, this) == 0)
         Error("FitPanel", "Unable to crate the FitPanel");
   }
   else
         Error("FitPanel", "Unable to find the FitPanel plug-in");
}

//______________________________________________________________________________
Option_t *TMultiGraph::GetGraphDrawOption(const TGraph *gr) const
{
   // Return the draw option for the TGraph gr in this TMultiGraph
   // The return option is the one specified when calling TMultiGraph::Add(gr,option).

   if (!fGraphs || !gr) return "";
   TListIter next(fGraphs);
   TObject *obj;
   while ((obj = next())) {
      if (obj == (TObject*)gr) return next.GetOption();
   }
   return "";
}


//______________________________________________________________________________
void TMultiGraph::InitGaus(Double_t xmin, Double_t xmax)
{
   // Compute Initial values of parameters for a gaussian.

   Double_t allcha, sumx, sumx2, x, val, rms, mean;
   Int_t bin;
   const Double_t sqrtpi = 2.506628;

   // Compute mean value and RMS of the graph in the given range
   Int_t np = 0;
   allcha = sumx = sumx2 = 0;
   TGraph *g;
   TIter next(fGraphs);
   Double_t *px, *py;
   Int_t npp; //number of points in each graph
   while ((g = (TGraph*) next())) {
      px=g->GetX();
      py=g->GetY();
      npp=g->GetN();
      for (bin=0; bin<npp; bin++){
         x=px[bin];
         if (x<xmin || x>xmax) continue;
         np++;
         val=py[bin];
         sumx+=val*x;
         sumx2+=val*x*x;
         allcha+=val;
      }
   }
   if (np == 0 || allcha == 0) return;
   mean = sumx/allcha;
   rms  = TMath::Sqrt(sumx2/allcha - mean*mean);

   Double_t binwidx = TMath::Abs((xmax-xmin)/np);
   if (rms == 0) rms = 1;
   TVirtualFitter *grFitter = TVirtualFitter::GetFitter();
   TF1 *f1 = (TF1*)grFitter->GetUserFunc();
   f1->SetParameter(0,binwidx*allcha/(sqrtpi*rms));
   f1->SetParameter(1,mean);
   f1->SetParameter(2,rms);
   f1->SetParLimits(2,0,10*rms);
}


//______________________________________________________________________________
void TMultiGraph::InitExpo(Double_t xmin, Double_t xmax)
{
   // Compute Initial values of parameters for an exponential.

   Double_t constant, slope;
   Int_t ifail;

   LeastSquareLinearFit(-1, constant, slope, ifail, xmin, xmax);

   TVirtualFitter *grFitter = TVirtualFitter::GetFitter();
   TF1 *f1 = (TF1*)grFitter->GetUserFunc();
   f1->SetParameter(0,constant);
   f1->SetParameter(1,slope);
}


//______________________________________________________________________________
void TMultiGraph::InitPolynom(Double_t xmin, Double_t xmax)
{
   // Compute Initial values of parameters for a polynom.

   Double_t fitpar[25];

   TVirtualFitter *grFitter = TVirtualFitter::GetFitter();
   TF1 *f1 = (TF1*)grFitter->GetUserFunc();
   Int_t npar   = f1->GetNpar();

   LeastSquareFit(npar, fitpar, xmin, xmax);

   for (Int_t i=0;i<npar;i++) f1->SetParameter(i, fitpar[i]);
}


//______________________________________________________________________________
void TMultiGraph::LeastSquareFit(Int_t m, Double_t *a, Double_t xmin, Double_t xmax)
{
   // Least squares lpolynomial fitting without weights.
   //
   //  m     number of parameters
   //  a     array of parameters
   //  first 1st point number to fit (default =0)
   //  last  last point number to fit (default=fNpoints-1)
   //
   //   based on CERNLIB routine LSQ: Translated to C++ by Rene Brun

   const Double_t zero = 0.;
   const Double_t one = 1.;
   const Int_t idim = 20;

   Double_t  b[400]        /* was [20][20] */;
   Int_t i, k, l, ifail, bin;
   Double_t power;
   Double_t da[20], xk, yk;


   //count the total number of points to fit
   TGraph *g;
   TIter next(fGraphs);
   Double_t *px, *py;
   Int_t n=0;
   Int_t npp;
   while ((g = (TGraph*) next())) {
      px=g->GetX();
      py=g->GetY();
      npp=g->GetN();
      for (bin=0; bin<npp; bin++){
         xk=px[bin];
         if (xk < xmin || xk > xmax) continue;
         n++;
      }
   }
   if (m <= 2) {
      LeastSquareLinearFit(n, a[0], a[1], ifail, xmin, xmax);
      return;
   }
   if (m > idim || m > n) return;
   da[0] = zero;
   for (l = 2; l <= m; ++l) {
      b[l-1]           = zero;
      b[m + l*20 - 21] = zero;
      da[l-1]          = zero;
   }
   Int_t np = 0;

   next.Reset();
   while ((g = (TGraph*) next())) {
      px=g->GetX();
      py=g->GetY();
      npp=g->GetN();

      for (k = 0; k <= npp; ++k) {
         xk     = px[k];
         if (xk < xmin || xk > xmax) continue;
         np++;
         yk     = py[k];
         power  = one;
         da[0] += yk;
         for (l = 2; l <= m; ++l) {
            power   *= xk;
            b[l-1]  += power;
            da[l-1] += power*yk;
         }
         for (l = 2; l <= m; ++l) {
            power            *= xk;
            b[m + l*20 - 21] += power;
         }
      }
   }
   b[0]  = Double_t(np);
   for (i = 3; i <= m; ++i) {
      for (k = i; k <= m; ++k) {
         b[k - 1 + (i-1)*20 - 21] = b[k + (i-2)*20 - 21];
      }
   }
   H1LeastSquareSeqnd(m, b, idim, ifail, 1, da);

   if (ifail < 0) {
      //a[0] = fY[0];
      py=((TGraph *)fGraphs->First())->GetY();
      a[0]=py[0];
      for (i=1; i<m; ++i) a[i] = 0;
      return;
   }
   for (i=0; i<m; ++i) a[i] = da[i];
}


//______________________________________________________________________________
void TMultiGraph::LeastSquareLinearFit(Int_t ndata, Double_t &a0, Double_t &a1, Int_t &ifail, Double_t xmin, Double_t xmax)
{
   // Least square linear fit without weights.
   //
   //  Fit a straight line (a0 + a1*x) to the data in this graph.
   //  ndata:  number of points to fit
   //  first:  first point number to fit
   //  last:   last point to fit O(ndata should be last-first
   //  ifail:  return parameter indicating the status of the fit (ifail=0, fit is OK)
   //
   //   extracted from CERNLIB LLSQ: Translated to C++ by Rene Brun

   Double_t xbar, ybar, x2bar;
   Int_t i;
   Double_t xybar;
   Double_t fn, xk, yk;
   Double_t det;

   ifail = -2;
   xbar  = ybar = x2bar = xybar = 0;
   Int_t np = 0;
   TGraph *g;
   TIter next(fGraphs);
   Double_t *px, *py;
   Int_t npp;
   while ((g = (TGraph*) next())) {
      px=g->GetX();
      py=g->GetY();
      npp=g->GetN();
      for (i = 0; i < npp; ++i) {
         xk = px[i];
         if (xk < xmin || xk > xmax) continue;
         np++;
         yk = py[i];
         if (ndata < 0) {
            if (yk <= 0) yk = 1e-9;
            yk = TMath::Log(yk);
         }
         xbar  += xk;
         ybar  += yk;
         x2bar += xk*xk;
         xybar += xk*yk;
      }
   }
   fn    = Double_t(np);
   det   = fn*x2bar - xbar*xbar;
   ifail = -1;
   if (det <= 0) {
      if (fn > 0) a0 = ybar/fn;
      else        a0 = 0;
      a1 = 0;
      return;
   }
   ifail = 0;
   a0 = (x2bar*ybar - xbar*xybar) / det;
   a1 = (fn*xybar - xbar*ybar) / det;
}


//______________________________________________________________________________
TH1F *TMultiGraph::GetHistogram() const
{
   // Returns a pointer to the histogram used to draw the axis
   // Takes into account the two following cases.
   //    1- option 'A' was specified in TMultiGraph::Draw. Return fHistogram
   //    2- user had called TPad::DrawFrame. return pointer to hframe histogram

   if (fHistogram) return fHistogram;
   if (!gPad) return 0;
   gPad->Modified();
   gPad->Update();
   if (fHistogram) return fHistogram;
   TH1F *h1 = (TH1F*)gPad->FindObject("hframe");
   return h1;
}


//______________________________________________________________________________
TF1 *TMultiGraph::GetFunction(const char *name) const
{
   // Return pointer to function with name.
   //
   // Functions such as TGraph::Fit store the fitted function in the list of
   // functions of this graph.

   if (!fFunctions) return 0;
   return (TF1*)fFunctions->FindObject(name);
}

//______________________________________________________________________________
TList *TMultiGraph::GetListOfFunctions()
{
   // Return pointer to list of functions
   // if pointer is null create the list

   if (!fFunctions) fFunctions = new TList();
   return fFunctions;
}


//______________________________________________________________________________
TAxis *TMultiGraph::GetXaxis() const
{
   // Get x axis of the graph.

   if (!gPad) return 0;
   TH1 *h = GetHistogram();
   if (!h) return 0;
   return h->GetXaxis();
}


//______________________________________________________________________________
TAxis *TMultiGraph::GetYaxis() const
{
   // Get y axis of the graph.

   if (!gPad) return 0;
   TH1 *h = GetHistogram();
   if (!h) return 0;
   return h->GetYaxis();
}


//______________________________________________________________________________
void TMultiGraph::Paint(Option_t *option)
{
   // paint all the graphs of this multigraph

   if (fGraphs->GetSize() == 0) return;

   char *l;
   static char chopt[33];
   Int_t nch = strlen(option);
   Int_t i;
   for (i=0;i<nch;i++) chopt[i] = toupper(option[i]);
   chopt[nch] = 0;
   TGraph *g;

   l = strstr(chopt,"A");
   if (l) {
      *l = ' ';
      TIter   next(fGraphs);
      Int_t npt = 100;
      Double_t maximum, minimum, rwxmin, rwxmax, rwymin, rwymax, uxmin, uxmax, dx, dy;
      rwxmin    = gPad->GetUxmin();
      rwxmax    = gPad->GetUxmax();
      rwymin    = gPad->GetUymin();
      rwymax    = gPad->GetUymax();
      char *xtitle = 0;
      char *ytitle = 0;
      Int_t firstx = 0;
      Int_t lastx  = 0;

      if (fHistogram) {
         //cleanup in case of a previous unzoom
         if (fHistogram->GetMinimum() >= fHistogram->GetMaximum()) {
            nch = strlen(fHistogram->GetXaxis()->GetTitle());
            firstx = fHistogram->GetXaxis()->GetFirst();
            lastx  = fHistogram->GetXaxis()->GetLast();
            if (nch) {
               xtitle = new char[nch+1];
               strcpy(xtitle,fHistogram->GetXaxis()->GetTitle());
            }
            nch = strlen(fHistogram->GetYaxis()->GetTitle());
            if (nch) {
               ytitle = new char[nch+1];
               strcpy(ytitle,fHistogram->GetYaxis()->GetTitle());
            }
            delete fHistogram;
            fHistogram = 0;
         }
      }
      if (fHistogram) {
         minimum = fHistogram->GetYaxis()->GetXmin();
         maximum = fHistogram->GetYaxis()->GetXmax();
         uxmin   = gPad->PadtoX(rwxmin);
         uxmax   = gPad->PadtoX(rwxmax);
      } else {
         g = (TGraph*) next();
         g->ComputeRange(rwxmin, rwymin, rwxmax, rwymax);
         while ((g = (TGraph*) next())) {
            Double_t rx1,ry1,rx2,ry2;
            g->ComputeRange(rx1, ry1, rx2, ry2);
            if (rx1 < rwxmin) rwxmin = rx1;
            if (ry1 < rwymin) rwymin = ry1;
            if (rx2 > rwxmax) rwxmax = rx2;
            if (ry2 > rwymax) rwymax = ry2;
            if (g->GetN() > npt) npt = g->GetN();
         }
         if (rwxmin == rwxmax) rwxmax += 1.;
         if (rwymin == rwymax) rwymax += 1.;
         dx = 0.05*(rwxmax-rwxmin);
         dy = 0.05*(rwymax-rwymin);
         uxmin    = rwxmin - dx;
         uxmax    = rwxmax + dx;
         if (gPad->GetLogy()) {
            if (rwymin <= 0) rwymin = 0.001*rwymax;
            minimum = rwymin/(1+0.5*TMath::Log10(rwymax/rwymin));
            maximum = rwymax*(1+0.2*TMath::Log10(rwymax/rwymin));
         } else {
            minimum  = rwymin - dy;
            maximum  = rwymax + dy;
         }
         if (minimum < 0 && rwymin >= 0) minimum = 0;
         if (maximum > 0 && rwymax <= 0) maximum = 0;
      }

      if (fMinimum != -1111) rwymin = minimum = fMinimum;
      if (fMaximum != -1111) rwymax = maximum = fMaximum;
      if (uxmin < 0 && rwxmin >= 0) {
         if (gPad->GetLogx()) uxmin = 0.9*rwxmin;
         //else                 uxmin = 0;
      }
      if (uxmax > 0 && rwxmax <= 0) {
         if (gPad->GetLogx()) uxmax = 1.1*rwxmax;
         //else                 uxmax = 0;
      }
      if (minimum < 0 && rwymin >= 0) {
         if(gPad->GetLogy()) minimum = 0.9*rwymin;
         //else                minimum = 0;
      }
      if (maximum > 0 && rwymax <= 0) {
         if(gPad->GetLogy()) maximum = 1.1*rwymax;
         //else                maximum = 0;
      }
      if (minimum <= 0 && gPad->GetLogy()) minimum = 0.001*maximum;
      if (uxmin <= 0 && gPad->GetLogx()) {
         if (uxmax > 1000) uxmin = 1;
         else              uxmin = 0.001*uxmax;
      }
      rwymin = minimum;
      rwymax = maximum;
      if (fHistogram) {
         fHistogram->GetYaxis()->SetLimits(rwymin,rwymax);
      }

      // Create a temporary histogram to draw the axis
      if (!fHistogram) {
         // the graph is created with at least as many channels as there are points
         // to permit zooming on the full range
         rwxmin = uxmin;
         rwxmax = uxmax;
         fHistogram = new TH1F(GetName(),GetTitle(),npt,rwxmin,rwxmax);
         if (!fHistogram) return;
         fHistogram->SetMinimum(rwymin);
         fHistogram->SetBit(TH1::kNoStats);
         fHistogram->SetMaximum(rwymax);
         fHistogram->GetYaxis()->SetLimits(rwymin,rwymax);
         fHistogram->SetDirectory(0);
         if (xtitle) {fHistogram->GetXaxis()->SetTitle(xtitle); delete [] xtitle;}
         if (ytitle) {fHistogram->GetYaxis()->SetTitle(ytitle); delete [] ytitle;}
         if (firstx != lastx) fHistogram->GetXaxis()->SetRange(firstx,lastx);
      }
      fHistogram->Paint("0");
   }

   TGraph *gfit = 0;
   if (fGraphs) {
      TObjOptLink *lnk = (TObjOptLink*)fGraphs->FirstLink();
      TObject *obj = 0;

      while (lnk) {
         obj = lnk->GetObject();
         if (strlen(lnk->GetOption())) obj->Paint(lnk->GetOption());
         else                          obj->Paint(chopt);
         lnk = (TObjOptLink*)lnk->Next();
      }
      gfit = (TGraph*)obj; // pick one TGraph in the list to paint the fit parameters.
   }

   TObject *f;
   TF1 *fit = 0;
   if (fFunctions) {
      TIter   next(fFunctions);
      while ((f = (TObject*) next())) {
         if (f->InheritsFrom(TF1::Class())) {
            if (f->TestBit(TF1::kNotDraw) == 0) f->Paint("lsame");
            fit = (TF1*)f;
         } else  {
            f->Paint();
         }
      }
   }

   if (fit) gfit->PaintStats(fit);
}


//______________________________________________________________________________
void TMultiGraph::Print(Option_t *option) const
{
   // Print the list of graphs

   TGraph *g;
   if (fGraphs) {
      TIter   next(fGraphs);
      while ((g = (TGraph*) next())) {
         g->Print(option);
      }
   }
}


//______________________________________________________________________________
void TMultiGraph::RecursiveRemove(TObject *obj)
{
   // Recursively remove this object from a list. Typically implemented
   // by classes that can contain mulitple references to a same object.

   if (!fGraphs) return;
   TObject *objr = fGraphs->Remove(obj);
   if (!objr) return;
   delete fHistogram; fHistogram = 0;
   if (gPad) gPad->Modified();
}


//______________________________________________________________________________
void TMultiGraph::SavePrimitive(ostream &out, Option_t *option /*= ""*/)
{
   // Save primitive as a C++ statement(s) on output stream out

   char quote = '"';
   out<<"   "<<endl;
   if (gROOT->ClassSaved(TMultiGraph::Class())) {
      out<<"   ";
   } else {
      out<<"   TMultiGraph *";
   }
   out<<"multigraph = new TMultiGraph();"<<endl;
   out<<"   multigraph->SetName("<<quote<<GetName()<<quote<<");"<<endl;
   out<<"   multigraph->SetTitle("<<quote<<GetTitle()<<quote<<");"<<endl;

   if (fGraphs) {
      TObjOptLink *lnk = (TObjOptLink*)fGraphs->FirstLink();
      TObject *g;

      while (lnk) {
         g = lnk->GetObject();
         g->SavePrimitive(out, Form("multigraph%s",lnk->GetOption()));
         lnk = (TObjOptLink*)lnk->Next();
      }
   }
   out<<"   multigraph->Draw(" <<quote<<option<<quote<<");"<<endl;

   TAxis *xaxis = GetXaxis();
   TAxis *yaxis = GetYaxis();

   if (xaxis) xaxis->SaveAttributes(out, "multigraph","->GetXaxis()");
   if (yaxis) yaxis->SaveAttributes(out, "multigraph","->GetYaxis()");
}


//______________________________________________________________________________
void TMultiGraph::SetMaximum(Double_t maximum)
{
   // Set multigraph maximum.

   fMaximum = maximum;
   if (fHistogram)  fHistogram->SetMaximum(maximum);
}


//______________________________________________________________________________
void TMultiGraph::SetMinimum(Double_t minimum)
{
   // Set multigraph minimum.

   fMinimum = minimum;
   if (fHistogram) fHistogram->SetMinimum(minimum);
}
 TMultiGraph.cxx:1
 TMultiGraph.cxx:2
 TMultiGraph.cxx:3
 TMultiGraph.cxx:4
 TMultiGraph.cxx:5
 TMultiGraph.cxx:6
 TMultiGraph.cxx:7
 TMultiGraph.cxx:8
 TMultiGraph.cxx:9
 TMultiGraph.cxx:10
 TMultiGraph.cxx:11
 TMultiGraph.cxx:12
 TMultiGraph.cxx:13
 TMultiGraph.cxx:14
 TMultiGraph.cxx:15
 TMultiGraph.cxx:16
 TMultiGraph.cxx:17
 TMultiGraph.cxx:18
 TMultiGraph.cxx:19
 TMultiGraph.cxx:20
 TMultiGraph.cxx:21
 TMultiGraph.cxx:22
 TMultiGraph.cxx:23
 TMultiGraph.cxx:24
 TMultiGraph.cxx:25
 TMultiGraph.cxx:26
 TMultiGraph.cxx:27
 TMultiGraph.cxx:28
 TMultiGraph.cxx:29
 TMultiGraph.cxx:30
 TMultiGraph.cxx:31
 TMultiGraph.cxx:32
 TMultiGraph.cxx:33
 TMultiGraph.cxx:34
 TMultiGraph.cxx:35
 TMultiGraph.cxx:36
 TMultiGraph.cxx:37
 TMultiGraph.cxx:38
 TMultiGraph.cxx:39
 TMultiGraph.cxx:40
 TMultiGraph.cxx:41
 TMultiGraph.cxx:42
 TMultiGraph.cxx:43
 TMultiGraph.cxx:44
 TMultiGraph.cxx:45
 TMultiGraph.cxx:46
 TMultiGraph.cxx:47
 TMultiGraph.cxx:48
 TMultiGraph.cxx:49
 TMultiGraph.cxx:50
 TMultiGraph.cxx:51
 TMultiGraph.cxx:52
 TMultiGraph.cxx:53
 TMultiGraph.cxx:54
 TMultiGraph.cxx:55
 TMultiGraph.cxx:56
 TMultiGraph.cxx:57
 TMultiGraph.cxx:58
 TMultiGraph.cxx:59
 TMultiGraph.cxx:60
 TMultiGraph.cxx:61
 TMultiGraph.cxx:62
 TMultiGraph.cxx:63
 TMultiGraph.cxx:64
 TMultiGraph.cxx:65
 TMultiGraph.cxx:66
 TMultiGraph.cxx:67
 TMultiGraph.cxx:68
 TMultiGraph.cxx:69
 TMultiGraph.cxx:70
 TMultiGraph.cxx:71
 TMultiGraph.cxx:72
 TMultiGraph.cxx:73
 TMultiGraph.cxx:74
 TMultiGraph.cxx:75
 TMultiGraph.cxx:76
 TMultiGraph.cxx:77
 TMultiGraph.cxx:78
 TMultiGraph.cxx:79
 TMultiGraph.cxx:80
 TMultiGraph.cxx:81
 TMultiGraph.cxx:82
 TMultiGraph.cxx:83
 TMultiGraph.cxx:84
 TMultiGraph.cxx:85
 TMultiGraph.cxx:86
 TMultiGraph.cxx:87
 TMultiGraph.cxx:88
 TMultiGraph.cxx:89
 TMultiGraph.cxx:90
 TMultiGraph.cxx:91
 TMultiGraph.cxx:92
 TMultiGraph.cxx:93
 TMultiGraph.cxx:94
 TMultiGraph.cxx:95
 TMultiGraph.cxx:96
 TMultiGraph.cxx:97
 TMultiGraph.cxx:98
 TMultiGraph.cxx:99
 TMultiGraph.cxx:100
 TMultiGraph.cxx:101
 TMultiGraph.cxx:102
 TMultiGraph.cxx:103
 TMultiGraph.cxx:104
 TMultiGraph.cxx:105
 TMultiGraph.cxx:106
 TMultiGraph.cxx:107
 TMultiGraph.cxx:108
 TMultiGraph.cxx:109
 TMultiGraph.cxx:110
 TMultiGraph.cxx:111
 TMultiGraph.cxx:112
 TMultiGraph.cxx:113
 TMultiGraph.cxx:114
 TMultiGraph.cxx:115
 TMultiGraph.cxx:116
 TMultiGraph.cxx:117
 TMultiGraph.cxx:118
 TMultiGraph.cxx:119
 TMultiGraph.cxx:120
 TMultiGraph.cxx:121
 TMultiGraph.cxx:122
 TMultiGraph.cxx:123
 TMultiGraph.cxx:124
 TMultiGraph.cxx:125
 TMultiGraph.cxx:126
 TMultiGraph.cxx:127
 TMultiGraph.cxx:128
 TMultiGraph.cxx:129
 TMultiGraph.cxx:130
 TMultiGraph.cxx:131
 TMultiGraph.cxx:132
 TMultiGraph.cxx:133
 TMultiGraph.cxx:134
 TMultiGraph.cxx:135
 TMultiGraph.cxx:136
 TMultiGraph.cxx:137
 TMultiGraph.cxx:138
 TMultiGraph.cxx:139
 TMultiGraph.cxx:140
 TMultiGraph.cxx:141
 TMultiGraph.cxx:142
 TMultiGraph.cxx:143
 TMultiGraph.cxx:144
 TMultiGraph.cxx:145
 TMultiGraph.cxx:146
 TMultiGraph.cxx:147
 TMultiGraph.cxx:148
 TMultiGraph.cxx:149
 TMultiGraph.cxx:150
 TMultiGraph.cxx:151
 TMultiGraph.cxx:152
 TMultiGraph.cxx:153
 TMultiGraph.cxx:154
 TMultiGraph.cxx:155
 TMultiGraph.cxx:156
 TMultiGraph.cxx:157
 TMultiGraph.cxx:158
 TMultiGraph.cxx:159
 TMultiGraph.cxx:160
 TMultiGraph.cxx:161
 TMultiGraph.cxx:162
 TMultiGraph.cxx:163
 TMultiGraph.cxx:164
 TMultiGraph.cxx:165
 TMultiGraph.cxx:166
 TMultiGraph.cxx:167
 TMultiGraph.cxx:168
 TMultiGraph.cxx:169
 TMultiGraph.cxx:170
 TMultiGraph.cxx:171
 TMultiGraph.cxx:172
 TMultiGraph.cxx:173
 TMultiGraph.cxx:174
 TMultiGraph.cxx:175
 TMultiGraph.cxx:176
 TMultiGraph.cxx:177
 TMultiGraph.cxx:178
 TMultiGraph.cxx:179
 TMultiGraph.cxx:180
 TMultiGraph.cxx:181
 TMultiGraph.cxx:182
 TMultiGraph.cxx:183
 TMultiGraph.cxx:184
 TMultiGraph.cxx:185
 TMultiGraph.cxx:186
 TMultiGraph.cxx:187
 TMultiGraph.cxx:188
 TMultiGraph.cxx:189
 TMultiGraph.cxx:190
 TMultiGraph.cxx:191
 TMultiGraph.cxx:192
 TMultiGraph.cxx:193
 TMultiGraph.cxx:194
 TMultiGraph.cxx:195
 TMultiGraph.cxx:196
 TMultiGraph.cxx:197
 TMultiGraph.cxx:198
 TMultiGraph.cxx:199
 TMultiGraph.cxx:200
 TMultiGraph.cxx:201
 TMultiGraph.cxx:202
 TMultiGraph.cxx:203
 TMultiGraph.cxx:204
 TMultiGraph.cxx:205
 TMultiGraph.cxx:206
 TMultiGraph.cxx:207
 TMultiGraph.cxx:208
 TMultiGraph.cxx:209
 TMultiGraph.cxx:210
 TMultiGraph.cxx:211
 TMultiGraph.cxx:212
 TMultiGraph.cxx:213
 TMultiGraph.cxx:214
 TMultiGraph.cxx:215
 TMultiGraph.cxx:216
 TMultiGraph.cxx:217
 TMultiGraph.cxx:218
 TMultiGraph.cxx:219
 TMultiGraph.cxx:220
 TMultiGraph.cxx:221
 TMultiGraph.cxx:222
 TMultiGraph.cxx:223
 TMultiGraph.cxx:224
 TMultiGraph.cxx:225
 TMultiGraph.cxx:226
 TMultiGraph.cxx:227
 TMultiGraph.cxx:228
 TMultiGraph.cxx:229
 TMultiGraph.cxx:230
 TMultiGraph.cxx:231
 TMultiGraph.cxx:232
 TMultiGraph.cxx:233
 TMultiGraph.cxx:234
 TMultiGraph.cxx:235
 TMultiGraph.cxx:236
 TMultiGraph.cxx:237
 TMultiGraph.cxx:238
 TMultiGraph.cxx:239
 TMultiGraph.cxx:240
 TMultiGraph.cxx:241
 TMultiGraph.cxx:242
 TMultiGraph.cxx:243
 TMultiGraph.cxx:244
 TMultiGraph.cxx:245
 TMultiGraph.cxx:246
 TMultiGraph.cxx:247
 TMultiGraph.cxx:248
 TMultiGraph.cxx:249
 TMultiGraph.cxx:250
 TMultiGraph.cxx:251
 TMultiGraph.cxx:252
 TMultiGraph.cxx:253
 TMultiGraph.cxx:254
 TMultiGraph.cxx:255
 TMultiGraph.cxx:256
 TMultiGraph.cxx:257
 TMultiGraph.cxx:258
 TMultiGraph.cxx:259
 TMultiGraph.cxx:260
 TMultiGraph.cxx:261
 TMultiGraph.cxx:262
 TMultiGraph.cxx:263
 TMultiGraph.cxx:264
 TMultiGraph.cxx:265
 TMultiGraph.cxx:266
 TMultiGraph.cxx:267
 TMultiGraph.cxx:268
 TMultiGraph.cxx:269
 TMultiGraph.cxx:270
 TMultiGraph.cxx:271
 TMultiGraph.cxx:272
 TMultiGraph.cxx:273
 TMultiGraph.cxx:274
 TMultiGraph.cxx:275
 TMultiGraph.cxx:276
 TMultiGraph.cxx:277
 TMultiGraph.cxx:278
 TMultiGraph.cxx:279
 TMultiGraph.cxx:280
 TMultiGraph.cxx:281
 TMultiGraph.cxx:282
 TMultiGraph.cxx:283
 TMultiGraph.cxx:284
 TMultiGraph.cxx:285
 TMultiGraph.cxx:286
 TMultiGraph.cxx:287
 TMultiGraph.cxx:288
 TMultiGraph.cxx:289
 TMultiGraph.cxx:290
 TMultiGraph.cxx:291
 TMultiGraph.cxx:292
 TMultiGraph.cxx:293
 TMultiGraph.cxx:294
 TMultiGraph.cxx:295
 TMultiGraph.cxx:296
 TMultiGraph.cxx:297
 TMultiGraph.cxx:298
 TMultiGraph.cxx:299
 TMultiGraph.cxx:300
 TMultiGraph.cxx:301
 TMultiGraph.cxx:302
 TMultiGraph.cxx:303
 TMultiGraph.cxx:304
 TMultiGraph.cxx:305
 TMultiGraph.cxx:306
 TMultiGraph.cxx:307
 TMultiGraph.cxx:308
 TMultiGraph.cxx:309
 TMultiGraph.cxx:310
 TMultiGraph.cxx:311
 TMultiGraph.cxx:312
 TMultiGraph.cxx:313
 TMultiGraph.cxx:314
 TMultiGraph.cxx:315
 TMultiGraph.cxx:316
 TMultiGraph.cxx:317
 TMultiGraph.cxx:318
 TMultiGraph.cxx:319
 TMultiGraph.cxx:320
 TMultiGraph.cxx:321
 TMultiGraph.cxx:322
 TMultiGraph.cxx:323
 TMultiGraph.cxx:324
 TMultiGraph.cxx:325
 TMultiGraph.cxx:326
 TMultiGraph.cxx:327
 TMultiGraph.cxx:328
 TMultiGraph.cxx:329
 TMultiGraph.cxx:330
 TMultiGraph.cxx:331
 TMultiGraph.cxx:332
 TMultiGraph.cxx:333
 TMultiGraph.cxx:334
 TMultiGraph.cxx:335
 TMultiGraph.cxx:336
 TMultiGraph.cxx:337
 TMultiGraph.cxx:338
 TMultiGraph.cxx:339
 TMultiGraph.cxx:340
 TMultiGraph.cxx:341
 TMultiGraph.cxx:342
 TMultiGraph.cxx:343
 TMultiGraph.cxx:344
 TMultiGraph.cxx:345
 TMultiGraph.cxx:346
 TMultiGraph.cxx:347
 TMultiGraph.cxx:348
 TMultiGraph.cxx:349
 TMultiGraph.cxx:350
 TMultiGraph.cxx:351
 TMultiGraph.cxx:352
 TMultiGraph.cxx:353
 TMultiGraph.cxx:354
 TMultiGraph.cxx:355
 TMultiGraph.cxx:356
 TMultiGraph.cxx:357
 TMultiGraph.cxx:358
 TMultiGraph.cxx:359
 TMultiGraph.cxx:360
 TMultiGraph.cxx:361
 TMultiGraph.cxx:362
 TMultiGraph.cxx:363
 TMultiGraph.cxx:364
 TMultiGraph.cxx:365
 TMultiGraph.cxx:366
 TMultiGraph.cxx:367
 TMultiGraph.cxx:368
 TMultiGraph.cxx:369
 TMultiGraph.cxx:370
 TMultiGraph.cxx:371
 TMultiGraph.cxx:372
 TMultiGraph.cxx:373
 TMultiGraph.cxx:374
 TMultiGraph.cxx:375
 TMultiGraph.cxx:376
 TMultiGraph.cxx:377
 TMultiGraph.cxx:378
 TMultiGraph.cxx:379
 TMultiGraph.cxx:380
 TMultiGraph.cxx:381
 TMultiGraph.cxx:382
 TMultiGraph.cxx:383
 TMultiGraph.cxx:384
 TMultiGraph.cxx:385
 TMultiGraph.cxx:386
 TMultiGraph.cxx:387
 TMultiGraph.cxx:388
 TMultiGraph.cxx:389
 TMultiGraph.cxx:390
 TMultiGraph.cxx:391
 TMultiGraph.cxx:392
 TMultiGraph.cxx:393
 TMultiGraph.cxx:394
 TMultiGraph.cxx:395
 TMultiGraph.cxx:396
 TMultiGraph.cxx:397
 TMultiGraph.cxx:398
 TMultiGraph.cxx:399
 TMultiGraph.cxx:400
 TMultiGraph.cxx:401
 TMultiGraph.cxx:402
 TMultiGraph.cxx:403
 TMultiGraph.cxx:404
 TMultiGraph.cxx:405
 TMultiGraph.cxx:406
 TMultiGraph.cxx:407
 TMultiGraph.cxx:408
 TMultiGraph.cxx:409
 TMultiGraph.cxx:410
 TMultiGraph.cxx:411
 TMultiGraph.cxx:412
 TMultiGraph.cxx:413
 TMultiGraph.cxx:414
 TMultiGraph.cxx:415
 TMultiGraph.cxx:416
 TMultiGraph.cxx:417
 TMultiGraph.cxx:418
 TMultiGraph.cxx:419
 TMultiGraph.cxx:420
 TMultiGraph.cxx:421
 TMultiGraph.cxx:422
 TMultiGraph.cxx:423
 TMultiGraph.cxx:424
 TMultiGraph.cxx:425
 TMultiGraph.cxx:426
 TMultiGraph.cxx:427
 TMultiGraph.cxx:428
 TMultiGraph.cxx:429
 TMultiGraph.cxx:430
 TMultiGraph.cxx:431
 TMultiGraph.cxx:432
 TMultiGraph.cxx:433
 TMultiGraph.cxx:434
 TMultiGraph.cxx:435
 TMultiGraph.cxx:436
 TMultiGraph.cxx:437
 TMultiGraph.cxx:438
 TMultiGraph.cxx:439
 TMultiGraph.cxx:440
 TMultiGraph.cxx:441
 TMultiGraph.cxx:442
 TMultiGraph.cxx:443
 TMultiGraph.cxx:444
 TMultiGraph.cxx:445
 TMultiGraph.cxx:446
 TMultiGraph.cxx:447
 TMultiGraph.cxx:448
 TMultiGraph.cxx:449
 TMultiGraph.cxx:450
 TMultiGraph.cxx:451
 TMultiGraph.cxx:452
 TMultiGraph.cxx:453
 TMultiGraph.cxx:454
 TMultiGraph.cxx:455
 TMultiGraph.cxx:456
 TMultiGraph.cxx:457
 TMultiGraph.cxx:458
 TMultiGraph.cxx:459
 TMultiGraph.cxx:460
 TMultiGraph.cxx:461
 TMultiGraph.cxx:462
 TMultiGraph.cxx:463
 TMultiGraph.cxx:464
 TMultiGraph.cxx:465
 TMultiGraph.cxx:466
 TMultiGraph.cxx:467
 TMultiGraph.cxx:468
 TMultiGraph.cxx:469
 TMultiGraph.cxx:470
 TMultiGraph.cxx:471
 TMultiGraph.cxx:472
 TMultiGraph.cxx:473
 TMultiGraph.cxx:474
 TMultiGraph.cxx:475
 TMultiGraph.cxx:476
 TMultiGraph.cxx:477
 TMultiGraph.cxx:478
 TMultiGraph.cxx:479
 TMultiGraph.cxx:480
 TMultiGraph.cxx:481
 TMultiGraph.cxx:482
 TMultiGraph.cxx:483
 TMultiGraph.cxx:484
 TMultiGraph.cxx:485
 TMultiGraph.cxx:486
 TMultiGraph.cxx:487
 TMultiGraph.cxx:488
 TMultiGraph.cxx:489
 TMultiGraph.cxx:490
 TMultiGraph.cxx:491
 TMultiGraph.cxx:492
 TMultiGraph.cxx:493
 TMultiGraph.cxx:494
 TMultiGraph.cxx:495
 TMultiGraph.cxx:496
 TMultiGraph.cxx:497
 TMultiGraph.cxx:498
 TMultiGraph.cxx:499
 TMultiGraph.cxx:500
 TMultiGraph.cxx:501
 TMultiGraph.cxx:502
 TMultiGraph.cxx:503
 TMultiGraph.cxx:504
 TMultiGraph.cxx:505
 TMultiGraph.cxx:506
 TMultiGraph.cxx:507
 TMultiGraph.cxx:508
 TMultiGraph.cxx:509
 TMultiGraph.cxx:510
 TMultiGraph.cxx:511
 TMultiGraph.cxx:512
 TMultiGraph.cxx:513
 TMultiGraph.cxx:514
 TMultiGraph.cxx:515
 TMultiGraph.cxx:516
 TMultiGraph.cxx:517
 TMultiGraph.cxx:518
 TMultiGraph.cxx:519
 TMultiGraph.cxx:520
 TMultiGraph.cxx:521
 TMultiGraph.cxx:522
 TMultiGraph.cxx:523
 TMultiGraph.cxx:524
 TMultiGraph.cxx:525
 TMultiGraph.cxx:526
 TMultiGraph.cxx:527
 TMultiGraph.cxx:528
 TMultiGraph.cxx:529
 TMultiGraph.cxx:530
 TMultiGraph.cxx:531
 TMultiGraph.cxx:532
 TMultiGraph.cxx:533
 TMultiGraph.cxx:534
 TMultiGraph.cxx:535
 TMultiGraph.cxx:536
 TMultiGraph.cxx:537
 TMultiGraph.cxx:538
 TMultiGraph.cxx:539
 TMultiGraph.cxx:540
 TMultiGraph.cxx:541
 TMultiGraph.cxx:542
 TMultiGraph.cxx:543
 TMultiGraph.cxx:544
 TMultiGraph.cxx:545
 TMultiGraph.cxx:546
 TMultiGraph.cxx:547
 TMultiGraph.cxx:548
 TMultiGraph.cxx:549
 TMultiGraph.cxx:550
 TMultiGraph.cxx:551
 TMultiGraph.cxx:552
 TMultiGraph.cxx:553
 TMultiGraph.cxx:554
 TMultiGraph.cxx:555
 TMultiGraph.cxx:556
 TMultiGraph.cxx:557
 TMultiGraph.cxx:558
 TMultiGraph.cxx:559
 TMultiGraph.cxx:560
 TMultiGraph.cxx:561
 TMultiGraph.cxx:562
 TMultiGraph.cxx:563
 TMultiGraph.cxx:564
 TMultiGraph.cxx:565
 TMultiGraph.cxx:566
 TMultiGraph.cxx:567
 TMultiGraph.cxx:568
 TMultiGraph.cxx:569
 TMultiGraph.cxx:570
 TMultiGraph.cxx:571
 TMultiGraph.cxx:572
 TMultiGraph.cxx:573
 TMultiGraph.cxx:574
 TMultiGraph.cxx:575
 TMultiGraph.cxx:576
 TMultiGraph.cxx:577
 TMultiGraph.cxx:578
 TMultiGraph.cxx:579
 TMultiGraph.cxx:580
 TMultiGraph.cxx:581
 TMultiGraph.cxx:582
 TMultiGraph.cxx:583
 TMultiGraph.cxx:584
 TMultiGraph.cxx:585
 TMultiGraph.cxx:586
 TMultiGraph.cxx:587
 TMultiGraph.cxx:588
 TMultiGraph.cxx:589
 TMultiGraph.cxx:590
 TMultiGraph.cxx:591
 TMultiGraph.cxx:592
 TMultiGraph.cxx:593
 TMultiGraph.cxx:594
 TMultiGraph.cxx:595
 TMultiGraph.cxx:596
 TMultiGraph.cxx:597
 TMultiGraph.cxx:598
 TMultiGraph.cxx:599
 TMultiGraph.cxx:600
 TMultiGraph.cxx:601
 TMultiGraph.cxx:602
 TMultiGraph.cxx:603
 TMultiGraph.cxx:604
 TMultiGraph.cxx:605
 TMultiGraph.cxx:606
 TMultiGraph.cxx:607
 TMultiGraph.cxx:608
 TMultiGraph.cxx:609
 TMultiGraph.cxx:610
 TMultiGraph.cxx:611
 TMultiGraph.cxx:612
 TMultiGraph.cxx:613
 TMultiGraph.cxx:614
 TMultiGraph.cxx:615
 TMultiGraph.cxx:616
 TMultiGraph.cxx:617
 TMultiGraph.cxx:618
 TMultiGraph.cxx:619
 TMultiGraph.cxx:620
 TMultiGraph.cxx:621
 TMultiGraph.cxx:622
 TMultiGraph.cxx:623
 TMultiGraph.cxx:624
 TMultiGraph.cxx:625
 TMultiGraph.cxx:626
 TMultiGraph.cxx:627
 TMultiGraph.cxx:628
 TMultiGraph.cxx:629
 TMultiGraph.cxx:630
 TMultiGraph.cxx:631
 TMultiGraph.cxx:632
 TMultiGraph.cxx:633
 TMultiGraph.cxx:634
 TMultiGraph.cxx:635
 TMultiGraph.cxx:636
 TMultiGraph.cxx:637
 TMultiGraph.cxx:638
 TMultiGraph.cxx:639
 TMultiGraph.cxx:640
 TMultiGraph.cxx:641
 TMultiGraph.cxx:642
 TMultiGraph.cxx:643
 TMultiGraph.cxx:644
 TMultiGraph.cxx:645
 TMultiGraph.cxx:646
 TMultiGraph.cxx:647
 TMultiGraph.cxx:648
 TMultiGraph.cxx:649
 TMultiGraph.cxx:650
 TMultiGraph.cxx:651
 TMultiGraph.cxx:652
 TMultiGraph.cxx:653
 TMultiGraph.cxx:654
 TMultiGraph.cxx:655
 TMultiGraph.cxx:656
 TMultiGraph.cxx:657
 TMultiGraph.cxx:658
 TMultiGraph.cxx:659
 TMultiGraph.cxx:660
 TMultiGraph.cxx:661
 TMultiGraph.cxx:662
 TMultiGraph.cxx:663
 TMultiGraph.cxx:664
 TMultiGraph.cxx:665
 TMultiGraph.cxx:666
 TMultiGraph.cxx:667
 TMultiGraph.cxx:668
 TMultiGraph.cxx:669
 TMultiGraph.cxx:670
 TMultiGraph.cxx:671
 TMultiGraph.cxx:672
 TMultiGraph.cxx:673
 TMultiGraph.cxx:674
 TMultiGraph.cxx:675
 TMultiGraph.cxx:676
 TMultiGraph.cxx:677
 TMultiGraph.cxx:678
 TMultiGraph.cxx:679
 TMultiGraph.cxx:680
 TMultiGraph.cxx:681
 TMultiGraph.cxx:682
 TMultiGraph.cxx:683
 TMultiGraph.cxx:684
 TMultiGraph.cxx:685
 TMultiGraph.cxx:686
 TMultiGraph.cxx:687
 TMultiGraph.cxx:688
 TMultiGraph.cxx:689
 TMultiGraph.cxx:690
 TMultiGraph.cxx:691
 TMultiGraph.cxx:692
 TMultiGraph.cxx:693
 TMultiGraph.cxx:694
 TMultiGraph.cxx:695
 TMultiGraph.cxx:696
 TMultiGraph.cxx:697
 TMultiGraph.cxx:698
 TMultiGraph.cxx:699
 TMultiGraph.cxx:700
 TMultiGraph.cxx:701
 TMultiGraph.cxx:702
 TMultiGraph.cxx:703
 TMultiGraph.cxx:704
 TMultiGraph.cxx:705
 TMultiGraph.cxx:706
 TMultiGraph.cxx:707
 TMultiGraph.cxx:708
 TMultiGraph.cxx:709
 TMultiGraph.cxx:710
 TMultiGraph.cxx:711
 TMultiGraph.cxx:712
 TMultiGraph.cxx:713
 TMultiGraph.cxx:714
 TMultiGraph.cxx:715
 TMultiGraph.cxx:716
 TMultiGraph.cxx:717
 TMultiGraph.cxx:718
 TMultiGraph.cxx:719
 TMultiGraph.cxx:720
 TMultiGraph.cxx:721
 TMultiGraph.cxx:722
 TMultiGraph.cxx:723
 TMultiGraph.cxx:724
 TMultiGraph.cxx:725
 TMultiGraph.cxx:726
 TMultiGraph.cxx:727
 TMultiGraph.cxx:728
 TMultiGraph.cxx:729
 TMultiGraph.cxx:730
 TMultiGraph.cxx:731
 TMultiGraph.cxx:732
 TMultiGraph.cxx:733
 TMultiGraph.cxx:734
 TMultiGraph.cxx:735
 TMultiGraph.cxx:736
 TMultiGraph.cxx:737
 TMultiGraph.cxx:738
 TMultiGraph.cxx:739
 TMultiGraph.cxx:740
 TMultiGraph.cxx:741
 TMultiGraph.cxx:742
 TMultiGraph.cxx:743
 TMultiGraph.cxx:744
 TMultiGraph.cxx:745
 TMultiGraph.cxx:746
 TMultiGraph.cxx:747
 TMultiGraph.cxx:748
 TMultiGraph.cxx:749
 TMultiGraph.cxx:750
 TMultiGraph.cxx:751
 TMultiGraph.cxx:752
 TMultiGraph.cxx:753
 TMultiGraph.cxx:754
 TMultiGraph.cxx:755
 TMultiGraph.cxx:756
 TMultiGraph.cxx:757
 TMultiGraph.cxx:758
 TMultiGraph.cxx:759
 TMultiGraph.cxx:760
 TMultiGraph.cxx:761
 TMultiGraph.cxx:762
 TMultiGraph.cxx:763
 TMultiGraph.cxx:764
 TMultiGraph.cxx:765
 TMultiGraph.cxx:766
 TMultiGraph.cxx:767
 TMultiGraph.cxx:768
 TMultiGraph.cxx:769
 TMultiGraph.cxx:770
 TMultiGraph.cxx:771
 TMultiGraph.cxx:772
 TMultiGraph.cxx:773
 TMultiGraph.cxx:774
 TMultiGraph.cxx:775
 TMultiGraph.cxx:776
 TMultiGraph.cxx:777
 TMultiGraph.cxx:778
 TMultiGraph.cxx:779
 TMultiGraph.cxx:780
 TMultiGraph.cxx:781
 TMultiGraph.cxx:782
 TMultiGraph.cxx:783
 TMultiGraph.cxx:784
 TMultiGraph.cxx:785
 TMultiGraph.cxx:786
 TMultiGraph.cxx:787
 TMultiGraph.cxx:788
 TMultiGraph.cxx:789
 TMultiGraph.cxx:790
 TMultiGraph.cxx:791
 TMultiGraph.cxx:792
 TMultiGraph.cxx:793
 TMultiGraph.cxx:794
 TMultiGraph.cxx:795
 TMultiGraph.cxx:796
 TMultiGraph.cxx:797
 TMultiGraph.cxx:798
 TMultiGraph.cxx:799
 TMultiGraph.cxx:800
 TMultiGraph.cxx:801
 TMultiGraph.cxx:802
 TMultiGraph.cxx:803
 TMultiGraph.cxx:804
 TMultiGraph.cxx:805
 TMultiGraph.cxx:806
 TMultiGraph.cxx:807
 TMultiGraph.cxx:808
 TMultiGraph.cxx:809
 TMultiGraph.cxx:810
 TMultiGraph.cxx:811
 TMultiGraph.cxx:812
 TMultiGraph.cxx:813
 TMultiGraph.cxx:814
 TMultiGraph.cxx:815
 TMultiGraph.cxx:816
 TMultiGraph.cxx:817
 TMultiGraph.cxx:818
 TMultiGraph.cxx:819
 TMultiGraph.cxx:820
 TMultiGraph.cxx:821
 TMultiGraph.cxx:822
 TMultiGraph.cxx:823
 TMultiGraph.cxx:824
 TMultiGraph.cxx:825
 TMultiGraph.cxx:826
 TMultiGraph.cxx:827
 TMultiGraph.cxx:828
 TMultiGraph.cxx:829
 TMultiGraph.cxx:830
 TMultiGraph.cxx:831
 TMultiGraph.cxx:832
 TMultiGraph.cxx:833
 TMultiGraph.cxx:834
 TMultiGraph.cxx:835
 TMultiGraph.cxx:836
 TMultiGraph.cxx:837
 TMultiGraph.cxx:838
 TMultiGraph.cxx:839
 TMultiGraph.cxx:840
 TMultiGraph.cxx:841
 TMultiGraph.cxx:842
 TMultiGraph.cxx:843
 TMultiGraph.cxx:844
 TMultiGraph.cxx:845
 TMultiGraph.cxx:846
 TMultiGraph.cxx:847
 TMultiGraph.cxx:848
 TMultiGraph.cxx:849
 TMultiGraph.cxx:850
 TMultiGraph.cxx:851
 TMultiGraph.cxx:852
 TMultiGraph.cxx:853
 TMultiGraph.cxx:854
 TMultiGraph.cxx:855
 TMultiGraph.cxx:856
 TMultiGraph.cxx:857
 TMultiGraph.cxx:858
 TMultiGraph.cxx:859
 TMultiGraph.cxx:860
 TMultiGraph.cxx:861
 TMultiGraph.cxx:862
 TMultiGraph.cxx:863
 TMultiGraph.cxx:864
 TMultiGraph.cxx:865
 TMultiGraph.cxx:866
 TMultiGraph.cxx:867
 TMultiGraph.cxx:868
 TMultiGraph.cxx:869
 TMultiGraph.cxx:870
 TMultiGraph.cxx:871
 TMultiGraph.cxx:872
 TMultiGraph.cxx:873
 TMultiGraph.cxx:874
 TMultiGraph.cxx:875
 TMultiGraph.cxx:876
 TMultiGraph.cxx:877
 TMultiGraph.cxx:878
 TMultiGraph.cxx:879
 TMultiGraph.cxx:880
 TMultiGraph.cxx:881
 TMultiGraph.cxx:882
 TMultiGraph.cxx:883
 TMultiGraph.cxx:884
 TMultiGraph.cxx:885
 TMultiGraph.cxx:886
 TMultiGraph.cxx:887
 TMultiGraph.cxx:888
 TMultiGraph.cxx:889
 TMultiGraph.cxx:890
 TMultiGraph.cxx:891
 TMultiGraph.cxx:892
 TMultiGraph.cxx:893
 TMultiGraph.cxx:894
 TMultiGraph.cxx:895
 TMultiGraph.cxx:896
 TMultiGraph.cxx:897
 TMultiGraph.cxx:898
 TMultiGraph.cxx:899
 TMultiGraph.cxx:900
 TMultiGraph.cxx:901
 TMultiGraph.cxx:902
 TMultiGraph.cxx:903
 TMultiGraph.cxx:904
 TMultiGraph.cxx:905
 TMultiGraph.cxx:906
 TMultiGraph.cxx:907
 TMultiGraph.cxx:908
 TMultiGraph.cxx:909
 TMultiGraph.cxx:910
 TMultiGraph.cxx:911
 TMultiGraph.cxx:912
 TMultiGraph.cxx:913
 TMultiGraph.cxx:914
 TMultiGraph.cxx:915
 TMultiGraph.cxx:916
 TMultiGraph.cxx:917
 TMultiGraph.cxx:918
 TMultiGraph.cxx:919
 TMultiGraph.cxx:920
 TMultiGraph.cxx:921
 TMultiGraph.cxx:922
 TMultiGraph.cxx:923
 TMultiGraph.cxx:924
 TMultiGraph.cxx:925
 TMultiGraph.cxx:926
 TMultiGraph.cxx:927
 TMultiGraph.cxx:928
 TMultiGraph.cxx:929
 TMultiGraph.cxx:930
 TMultiGraph.cxx:931
 TMultiGraph.cxx:932
 TMultiGraph.cxx:933
 TMultiGraph.cxx:934
 TMultiGraph.cxx:935
 TMultiGraph.cxx:936
 TMultiGraph.cxx:937
 TMultiGraph.cxx:938
 TMultiGraph.cxx:939
 TMultiGraph.cxx:940
 TMultiGraph.cxx:941
 TMultiGraph.cxx:942
 TMultiGraph.cxx:943
 TMultiGraph.cxx:944
 TMultiGraph.cxx:945
 TMultiGraph.cxx:946
 TMultiGraph.cxx:947
 TMultiGraph.cxx:948
 TMultiGraph.cxx:949
 TMultiGraph.cxx:950
 TMultiGraph.cxx:951
 TMultiGraph.cxx:952
 TMultiGraph.cxx:953
 TMultiGraph.cxx:954
 TMultiGraph.cxx:955
 TMultiGraph.cxx:956
 TMultiGraph.cxx:957
 TMultiGraph.cxx:958
 TMultiGraph.cxx:959
 TMultiGraph.cxx:960
 TMultiGraph.cxx:961
 TMultiGraph.cxx:962
 TMultiGraph.cxx:963
 TMultiGraph.cxx:964
 TMultiGraph.cxx:965
 TMultiGraph.cxx:966
 TMultiGraph.cxx:967
 TMultiGraph.cxx:968
 TMultiGraph.cxx:969
 TMultiGraph.cxx:970
 TMultiGraph.cxx:971
 TMultiGraph.cxx:972
 TMultiGraph.cxx:973
 TMultiGraph.cxx:974
 TMultiGraph.cxx:975
 TMultiGraph.cxx:976
 TMultiGraph.cxx:977
 TMultiGraph.cxx:978
 TMultiGraph.cxx:979
 TMultiGraph.cxx:980
 TMultiGraph.cxx:981
 TMultiGraph.cxx:982
 TMultiGraph.cxx:983
 TMultiGraph.cxx:984
 TMultiGraph.cxx:985
 TMultiGraph.cxx:986
 TMultiGraph.cxx:987
 TMultiGraph.cxx:988
 TMultiGraph.cxx:989
 TMultiGraph.cxx:990
 TMultiGraph.cxx:991
 TMultiGraph.cxx:992
 TMultiGraph.cxx:993
 TMultiGraph.cxx:994
 TMultiGraph.cxx:995