### Histogram package

#### new class TGraphTime

- `TGraphTime` is a new class to organize and draw a list of objects evolving with time. An example of use is shown in the tutorials `$ROOTSYS/tutorials/graphs/gtime.C` and `$ROOTSYS/tutorials/graphs/gtime2.C`.

The tutorial gtime.C shows the evolution of a set of points with time and it produces the following picture.

The tutorial gtime2.C is an example of TGraphTime showing how the class could be used to visualize a set of particles with their time stamp in a MonteCarlo program. It produces the following picture.

#### THStack

- The following macro produced two sets of superimposed labels with different text sizes:

      {
         TH1F *hgaus1 = new TH1F("Hgaus1", "", 100, -10, 10);
         TH1F *hgaus2 = new TH1F("Hgaus2", "", 100, -20, 20);
         THStack *hst = new THStack();
         hgaus1->FillRandom("gaus", 30000); hst->Add(hgaus1, "ep");
         hgaus2->FillRandom("gaus", 30000); hst->Add(hgaus2, "ep");
         hst->Draw("nostack");
         hst->GetHistogram()->SetLabelSize(0.07, "xy");
      }

- Change `THStack::GetMaximum()` and `THStack::GetMinimum()` to make sure the error bars fit entirely on the plot when a `THStack` is plotted with the option E. The following macro showed the problem:

      {
         TH1D *h1 = new TH1D("h1","h1",10,0,10);
         TH1D *h2 = new TH1D("h2","h2",10,0,10);
         THStack h;

         h1->SetLineColor(kRed);
         h1->SetMarkerStyle(20),
         h2->SetLineColor(kBlue);
         h2->SetMarkerStyle(21);

         for(int i=0; i<11; i++){
            h1->SetBinContent(i,1.5-i/10);
            h1->SetBinError(i,0.5*i);
            h2->SetBinContent(i,10.5-i/10);
            h2->SetBinError(i,0.7*i);
         }

         h.Add(h1);
         h.Add(h2);
         h.Draw("nostack E1");
      }

#### TGraphPainter

- TGraphAsymmErrors and TGraphBentErrors were not correctly clipped when paint with the option E3 (filled band) and zoomed.
- When drawn with the option B, a TGraph had the first or/and last bar missing if its lowest or/and highest value were equal to the minimum or/and maximum of the pad. The following lines illustrate the problem:

           Int_t x[5] = {0,1,2,3,4};
           Int_t y[5] = {10,1,2,3,0};
           Int_t n = 5;
           TGraph *gr = new TGraph(n,x,y);
           gr->Draw("AB*");

  This problem was submited here: https://savannah.cern.ch/bugs/index.php?53949

#### TFormula

- Add support for the ternary condition operator ( cond ? if_expr : else_expr ).

#### THStack

- The following macro produced two sets of superimposed labels with different text sizes:

      {
         TH1F *hgaus1 = new TH1F("Hgaus1", "", 100, -10, 10);
         TH1F *hgaus2 = new TH1F("Hgaus2", "", 100, -20, 20);
         THStack *hst = new THStack();
         hgaus1->FillRandom("gaus", 30000); hst->Add(hgaus1, "ep");
         hgaus2->FillRandom("gaus", 30000); hst->Add(hgaus2, "ep");
         hst->Draw("nostack");
         hst->GetHistogram()->SetLabelSize(0.07, "xy");
      }

#### TH1

- Fix problem in the resulting statistics of TH1::Add when the coeffient are negative, for an histogram subtraction. This fixes the issue #55911.
- In the implementation of TH1::ResetStats(), set the statistics to the one calculated using the bin center and also reset the number of entries to the total bin content or to the effective entries in case of a weighted histogram.
- Check the histogram compatibility, by comparing each bin, in the case of variable bin histogram, when using the histogram operation methods `TH1::Add` or `TH1::Multiply` or `TH1::Divide`

#### THistPainter

- Round correctly the number of entries displayed in the statistics box to the closest integer value.
- New plotting option `SURF7`. It is similar to `SURF3` except that the surface is plotted with colors and the contours on top with lines.

#### TGraph

- Fixed problem in <http://root.cern.ch/phpBB2/viewtopic.php?t=9208>

#### TGraphErrors

- Add a new fitting option `"EX0"`, to neglect the error in X when fitting

#### TGraph2DErrors

- New option `"ERR"` to draw `TGraphErrors` as error bars. The following picture has been produced with the option `"ERR P0"`.

#### THnSparse

- Make a function to generate a THnSparse from a corresponding TH1.
- Fixed a problem with the division methods, as well as implement unit tests for them.
- Remove some unnecessary parts of the methods Multiply and Divide.
- Implement the multiplication proposal in <http://root.cern.ch/phpBB2/viewtopic.php?t=7692>, as weel as implemeting unit tests for it.
- Add a new method `Fit()` for fitting a THNSparse. By default the likelihood method is used. For using a least square method (not really reccomended) if the histogram is really sparse, the option "X" must be used.

#### new classes TFitResult, TFitResultPtr

- All the `Fit` methods of the Hist library instead of returning an integer now return a `TFitResultPtr` object. The `TFitResultPtr` is an object that converts automatically to an integer, which represents the status code of the fit. If the Fit method is used as before, there is a no visible change for the user.
- When using the fit option `"S"`, the `TFitResultPtr` will now contain a pointer to the new `TFitResult` class. It will behave as a smart pointer to `TFitResult`, by using the `->` operator the user can call the `TFitResult` methods or access directly the `TFitResult` object, by using the de-reference operator `*` or `TFitResultPtr::Get()`.
- The `TFitResult` class derives from the `ROOT::Math::FitResult`, which contains all the result information from a fit and from `TNamed`. It provides then I/O capabilities for the FitResult object and convenience methods like `Print()`, `Write()`, `GetCovarianceMatrix()` and `GetCorrelationMatrix()` which return a TMatrixDSym object.
- Example of usage:

           TFitResult r = h->Fit("myFunc","S");
           TMatrixDSym cov = r->GetCovarianceMatrix();  //  to access the covariance matrix
           Double_t chi2   = r->Chi2(); // to retrieve the fit chi2
           Double_t par0   = r->Value(0); // retrieve the value for the parameter 0
           Double_t err0   = r->Error(0); // retrieve the error for the parameter 0
           r->Print("V");     // print full information of fit including covariance matrix
           r->Write();        // store the result in a file

### FitPanel

- Added predefined 2D Functions.
- Addition of new minimization algorithms from the GSL library and foreseen the addition of genetic minimizers when will be released.
- Fixed up to three bugs from the previous release
- Added the Update Button. This way the user can update the content of the fitpanel with all the new objects and functions created in the current ROOT session.
- Changed the way the TF1s were being copied internally. Instead of using TObject::Clone, now it's using the TF1 copy constructor

#### new tutorial rebin.C

This tutorial illustrates how to:

- create a variable binwidth histogram with a binning such that the population per bin is about the same.
- rebin a variable binwidth histogram into another one.