[root] / trunk / hist / hist / inc / TGraph.h Repository:
ViewVC logotype

Log of /trunk/hist/hist/inc/TGraph.h

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 44507 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 4 12:30:41 2012 UTC (2 years, 7 months ago) by axel
File length: 9608 byte(s)
Diff to previous 38549
Remove
  using namespace std;
from Riostream.h, which has huge consequences for all of ROOT.
Riostream.h is now a simple wrapper for fstream, iostream, iomanip for backward compatibility; Riosfwd.h simply wraps iosfwd.

Because of templates and their inline functions, Riostream.h needed to be included in headers, too (e.g. TParameter.h), which violated the assumption that Riostream.h is not exposing its using namespace std to headers.
ROOT now requires R__ANSISTREAM, R__SSTREAM, which does not change the set of supported compilers.

Without "using namespace std", several identifiers are now prefixed by std::; e.g. roofit/* source files now have a using namespace std to keep their coding style.
TFile::MakeProject() now generates "using namespace std" to convert the CINT-style class names into C++ ones.

Revision 38549 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 21 19:26:04 2011 UTC (3 years, 10 months ago) by pcanal
File length: 9603 byte(s)
Diff to previous 36493
Since TGraph::SetHistogram must be given a TH1F*, let's reflex this in the signature (fixes http://root.cern.ch/phpBB3/viewtopic.php?t=12386)

Revision 36493 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 3 13:01:36 2010 UTC (4 years, 2 months ago) by couet
File length: 9609 byte(s)
Diff to previous 31491
- New method IsInside() returning 1 if a (x,y) position is
  inside the polygons(s) defined by the graphs(s), 0 otherwise.

Revision 31491 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 1 18:11:55 2009 UTC (5 years, 1 month ago) by moneta
File length: 9544 byte(s)
Diff to previous 31207
Merge the changes from David in the dev branch (up to rev 31490) to return the TFitResultPtr from the Fit methods of 
TGraph, TGraph2D, TMultiGraph, THnSparse

Revision 31207 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 16 16:52:00 2009 UTC (5 years, 2 months ago) by moneta
File length: 9516 byte(s)
Diff to previous 30458
merge from  https://root.cern.ch/svn/root/branches/dev/mathDev/hist/hist  up to revision 31170 
from David and myself 


Summary of major changes: 

- TFitResult, TFitResultPtr

  - add new class TFitResult which extend FitResult with TNamed for the I/O. The result of the fit , including covariance and correlation matrix, minos errors, etc... can then be stored  in a file
  - add a class TFitResultPtr which behaves like a pointer to TFitResult and can be converted to an integer. This class is now returned by TH1::Fit and TGraph::Fit. By default the class contains only the returned integer status of the fit. If option "S" is used the class contains a pointer to TFitResult which can be retrieved using the -> or * operators (like a smart pointer)
The conversion to int provides backward compatibility with the old signature ( int TH1::Fit )

- TH1, TGraph, TGraph2D, TMultiGraph
  change from int Fit(....)  to TFitResultPtr Fit(.....)
  remove internal function DoFit  
  
- THnSparse

  add functionality for fitting a sparse histogram. Default method is the likelihood one. Chi2 can be used with the new option "X"

- FOption

 - add some new options for fitting: 
 
     "S" for storing the fit resul
     "X" for forcing chi2 fit in case of THnSParse
     "EX0" for neglecting errors in X when fitting TGraphErrors

- WrappedMultiTF1

 - make the wrapper for TF1 multi-dim function implementing the gradient interface 

Minos changes: 

 TH1: 
  - add check of compatibility for each bins when using Add on variable bin histograms

 TH3: 
 - fix a bug in setting the entries for a projected 2d profile when using weights
 THNSParse: 
 - set also the entries (and reset statistics) in the projected sparse histogram

 TFormula: 
 - define the number for the 2d function like xygaus or xylandau

 HFItInterface: 
  improve filling data for histograms (add support for bin volume normalization)
  add initialization for exponential and 2d gaus functions

Revision 30458 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 25 15:30:16 2009 UTC (5 years, 3 months ago) by moneta
File length: 9616 byte(s)
Diff to previous 29445
- from David: migrate his changes from dev branch 

  THnSParse 

 - Added a static function to create a THnSparse from a TH1 derived class as demanded in 
    http://root.cern.ch/phpBB2/viewtopic.php?t=7692
 - Small change to make both THnSparse::Divide methods to treat errors in the same way.
 - Implement the multiplication proposal in: http://root.cern.ch/phpBB2/viewtopic.php?t=7692

 TGraph.h 

  'Fix' the problem from http://root.cern.ch/phpBB2/viewtopic.php?t=9208
   Exclude TGraph::Fit(TF1 *) from the fit GUI and keep only TGraph::Fit(functionName) as it is for TH1

Revision 29445 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jul 11 12:15:45 2009 UTC (5 years, 6 months ago) by brun
File length: 9626 byte(s)
Diff to previous 29444
Follow the convention used for histograms also in TGraph::Integral.
If last argument=-1 the last point is taken.

Revision 29444 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jul 11 11:01:41 2009 UTC (5 years, 6 months ago) by brun
File length: 9625 byte(s)
Diff to previous 25487
Implement a new function computing the integral of a graph
Double_t TGraph::Integral(Int_t first, Int_t last) const
{
   // Integrate the TGraph data within a given (index) range
   // NB: if first=last=0 (default) take the full range from 0 to fNpoints-1
   //     if (first >= last) the function returns 0.
   //   : The graph segments should not intersect.
   //Method:
   // There are many ways to calculate the surface of a polygon. It all depends on what kind of data 
   // you have to deal with. The most evident solution would be to divide the polygon in triangles and 
   // calculate the surface of them. But this can quickly become complicated as you will have to test 
   // every segment of every triangle and check if they are intersecting with a current polygon?s 
   // segment or if it goes outside the polygone. Many calculations that would lead to many problems...
   //      The solution 
   // Fortunately for us, there is a simple way to solve this problem, as long as the polygon?s 
   // segments don?t intersect.   
   // It takes the x coordinate of the current vertex and multiply it by the y coordinate of the next 
   // vertex. Then it subtracts from it the result of the y coordinate of the current vertex multiplied
   // by the x coordinate of the next vertex. Then divide the result by 2 to get the surface/area.
   //      Sources
   //      http://forums.wolfram.com/mathgroup/archive/1998/Mar/msg00462.html
   //      http://stackoverflow.com/questions/451426/how-do-i-calculate-the-surface-area-of-a-2d-polygon

Revision 25487 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 22 12:44:13 2008 UTC (6 years, 4 months ago) by moneta
File length: 9555 byte(s)
Diff to previous 25360
Import changes from math development branch, in particular a re-implementation of 
fitting methods for the histogram and graph objects. 

NOTE: Since some files are removed, a  make clean-hist is needed in order to be able 
to compile hist after an svn update. 

 
The implementation of TH1::Fit, TGraph::Fit, TGraph2D::Fit and TMultiGraph::Fit is 
done in a common function implemented in HFitImpl.cxx (HFit::Fit). 

In addition the file HFitInterface.h define ROOT::Fit::FitObject functions passing 
option directly via Foption class and not by a string. They are used by the FitPanel.

Remove previously existing files THistFitInterface.cxx (and *.h) and 
TGraphFitInterface.cxx (and *.h). The code is now in the  HFitInterface.cxx (and *.h) 
files. 

Use plugin manager directly to open the Fit Panel. Do not pass anymore via the THistPainter. 
Changes in TH1::FitPanel, TGraph::FitPanel. 
Add FitPanel() method for TGraph2D and TMultiGraph. 

Add new class TBackCompFitter, providing a backward compatible implementation of 
TVirtualFitter using the new fitting class. It is constructed from the fitter class 
and can be used to retrieve the fit information (result and configuration) via the 
TVirtualFitter API from FitConfig and FitResult. A static istance is created after 
calling the Fit method.   
  
Other changes are:  


TGraph: 
  - when creating a graph from an histogram, don't use the same name. 
  Otherwise it will conflict later with histogram created internally by the TGraph. 

TH2: 
     add protected method TH2::DoFitSlices and TH2::DoProfile as common implementations
     for (FitSlicesX,FitSclicesY) and (ProfileX, ProfileY).
     pass the global statistics in DoProjection when range is (1,NBIN)

TBinimialEfficiencyFit: 
     add possibility to set verbose option, and set different precision and 
     max iterations for minimizing.

Revision 25360 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 4 13:45:47 2008 UTC (6 years, 4 months ago) by brun
File length: 9455 byte(s)
Diff to previous 24702
Change the API of TGrapg::GetPoint from
void TGraph::GetPoint(Int_t i, Double_t &x, Double_t &y) const
to
Int_t TGraph::GetPoint(Int_t i, Double_t &x, Double_t &y) const
   // The function returns -1 in case of an invalid request or the point number otherwise

Revision 24702 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 8 12:01:46 2008 UTC (6 years, 6 months ago) by brun
File length: 9455 byte(s)
Copied from: trunk/graf2d/graf/inc/TGraph.h revision 24701
Diff to previous 24105
-Move the TGraph classes and derivatives from graf2d to hist
-The graf2d/graf has now only one dictionary instead of 2

Revision 24105 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 2 18:53:37 2008 UTC (6 years, 7 months ago) by brun
Original Path: trunk/graf2d/graf/inc/TGraph.h
File length: 9455 byte(s)
Diff to previous 24084
Move back the functionm Zero from TGraphPainter::Zero to TGraph::Zero where it was originally.
This function is not a graphics function and it is used by several applications.

Revision 24084 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jun 1 15:34:01 2008 UTC (6 years, 7 months ago) by brun
Original Path: trunk/graf2d/graf/inc/TGraph.h
File length: 9334 byte(s)
Diff to previous 24065
From Olivier and me:

Split the TGraph classes to move the graphics code to separate classes.
These classes will be moved to the hist directory once the classes will be ok.
The TGraphs are painted via the TVirtualGraphPainter class and its concrete
implementation TGraphPainter.
At the difference of the TH1 classes for which a different painter is created
when drawing each histogram, one single TGraphPainter class is created.
The TGraphPainter class does not have internal state, all the information
from TGraph is passed to the drawing functions via parameters.

Revision 24065 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 30 08:54:58 2008 UTC (6 years, 7 months ago) by couet
Original Path: trunk/graf2d/graf/inc/TGraph.h
File length: 9107 byte(s)
Diff to previous 24064
- Roll back last commit.

Revision 24064 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 30 08:16:54 2008 UTC (6 years, 7 months ago) by couet
Original Path: trunk/graf2d/graf/inc/TGraph.h
File length: 9610 byte(s)
Diff to previous 23140
- All the methods doing graphics are now in TGraphPainter.

Revision 23140 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 11 11:01:39 2008 UTC (6 years, 9 months ago) by rdm
Original Path: trunk/graf2d/graf/inc/TGraph.h
File length: 9107 byte(s)
Diff to previous 20882
move the following directories to "graf2d":

asimage, freetype, gpad, graf, postscript, qt, win32gdk, x11, x11ttf

move the following directories to "graf3d":

eve, ftgl, g3d, gl, x3d

Revision 20882 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 19 11:31:26 2007 UTC (7 years, 2 months ago) by rdm
Original Path: trunk/graf/inc/TGraph.h
File length: 9107 byte(s)
Diff to previous 19826
Set property svn:eol-style LF on all source and Makefiles. This should avoid
problems with Win32 line endings ending up in the repository. All MS tools
support LF eols fine.

Revision 19826 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:56:11 2007 UTC (7 years, 4 months ago) by rdm
Original Path: trunk/graf/inc/TGraph.h
File length: 9107 byte(s)
Diff to previous 19825
imported svn:keywords Id property

Revision 19825 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 19 19:49:10 2007 UTC (7 years, 4 months ago) by rdm
Original Path: trunk/graf/inc/TGraph.h
File length: 9154 byte(s)
Diff to previous 19708
remove :$ from tag line

Revision 19708 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Aug 28 08:39:37 2007 UTC (7 years, 4 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 9164 byte(s)
Diff to previous 17620
Add code suggested by  	Thomas Schietinger at https://savannah.cern.ch/bugs/?29117
"May I suggest to include a CompareArg() in TGraph, similar to CompareRadius(), i.e. to provide (just for convenience) the possibility to sort the TGraph according to angle. This is useful when points lie on an ellipse or so, but are not in order."

Revision 17620 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 1 16:04:48 2007 UTC (7 years, 11 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 9088 byte(s)
Diff to previous 17469
Add missing forward declarations

Revision 17469 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jan 23 11:12:02 2007 UTC (8 years ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 9069 byte(s)
Diff to previous 16907
use forward declarations of TGraph, TH1, TAxis instead of includes.

Revision 16907 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 24 10:17:46 2006 UTC (8 years, 2 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 8915 byte(s)
Diff to previous 16731
Implement TGraph::RecursiveRemove.
Remove depency of TVirtualUtilPad

Revision 16731 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 10 08:32:21 2006 UTC (8 years, 2 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 8863 byte(s)
Diff to previous 15672
Add a new function:
Double_t TGraph::Chisquare(const TF1 *f1) const
{
   // Return the chisquare of this graph with respect to f1.
   // The chisquare is computed as the sum of the quantity below at each point:
   //
   //                     (y - f1(x))**2
   //         -----------------------------------
   //         ey**2 + (0.5*(exl + exh)*f1'(x))**2
   //
   // where x and y are the graph point coordinates and f1'(x) is the derivative of function f1(x).
   // This method to approximate the uncertainty in y because of the errors in x, is called
   // "effective variance" method.
   // In case of a pure TGraph, the denominator is 1.
   // In case of a TGraphErrors or TGraphAsymmErrors the errors are taken
   // into account.

Revision 15672 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 3 16:10:46 2006 UTC (8 years, 6 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 8810 byte(s)
Diff to previous 15134
from Axel:
Change the signature of SavePrimitive from

  void SavePrimitive(ofstream &out, Option_t *option);
to
  void SavePrimitive(ostream &out, Option_t *option = "");

With this change one can do, eg
   myhist.SavePrimitive(std::cout);

WARNING: do rm -f tree/src/*.o

Revision 15134 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 23 04:47:42 2006 UTC (8 years, 8 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 8806 byte(s)
Diff to previous 14903
From Federico Carminati:

"I have implemented all copy and equal operators needed to silence all
warnings in AliRoot, as requested. I have implemented shallow copies as
would do the default operators synthetized by the compiler.
Most operators are protected. If users complain, you just have to move
them into the public area, but class derivation is of course supported.
It has been a terrible job, I have modified 278 files, but the changes
are backward compabile, and this goes a long way to permitting user to
use the effc++ flag with root headers."

Revision 14903 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 3 13:33:23 2006 UTC (8 years, 8 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 8770 byte(s)
Diff to previous 14565
Replace all references to TVector by TVectorF

Revision 14565 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 6 13:45:26 2006 UTC (8 years, 9 months ago) by couet
Original Path: trunk/graf/inc/TGraph.h
File length: 8769 byte(s)
Diff to previous 13791
- When a graph is painted with the option "C" or "L" it is now possible to draw
  a filled area on one side of the line. This is useful to show exclusion
  zones. This drawing mode is activated when the absolute value of the
  graph line width (set thanks to SetLineWidth) is greater than 99. In that
  case the line width number is interpreted as 100*ff+ll = ffll . The two
  digits number "ll" represent the normal line width whereas "ff" is the
  filled area width. The sign of "ffll" allows to flip the filled area
  from one side of the line to the other. The current fill area attributes
  are used to draw the hatched zone.

  This new functionality is implemented thanks to the new method
  PaintPolylineHatches().

Revision 13791 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jan 6 21:46:21 2006 UTC (9 years ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 8680 byte(s)
Diff to previous 13304
From Axel:
this patch silences Cint's warning when generating the dictionary for
TGraph (and anything that includes TGraph.h):

Warning: Error occurred during reading source files
Error: Symbol CompareX is not defined in current scope
graf/inc/TGraph.h:158:

Revision 13304 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 21 13:57:42 2005 UTC (9 years, 2 months ago) by couet
Original Path: trunk/graf/inc/TGraph.h
File length: 8681 byte(s)
Diff to previous 13251
- Last mods (in graf) to make the rules checker happy.

Revision 13251 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 16 17:38:38 2005 UTC (9 years, 2 months ago) by couet
Original Path: trunk/graf/inc/TGraph.h
File length: 8680 byte(s)
Diff to previous 13103
- Mods to make the rules checker happy.

Revision 13103 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 1 16:42:26 2005 UTC (9 years, 2 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 8608 byte(s)
Diff to previous 11750
Replace forward declarations to classes like TMatrixD, TVectorD, etc
by includes like "TMatrixDfwd.h, TVectorDfwd.h"

Revision 11750 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 6 15:40:22 2005 UTC (9 years, 8 months ago) by rdm
Original Path: trunk/graf/inc/TGraph.h
File length: 8527 byte(s)
Diff to previous 11373
added default ctor to the Foption_t struct so that the initialization code
is not needed anymore in all the .cxx's files using Foption_t. This was
error prone as two new Foption_t members were not initialized in some
of the functions using them.

Revision 11373 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 18 22:41:27 2005 UTC (9 years, 10 months ago) by rdm
Original Path: trunk/graf/inc/TGraph.h
File length: 8918 byte(s)
Diff to previous 11251
From Marek:
- TH1::Merge() adding overflows even when merging histograms with the
  same limits. If the limits are different the overflows are ignored.
  The same in TH2::Merge, TH3::Merge, TProfile::Merge and TProfile2D::Merge.

- Cleaning fHistogram (and this kind of) variables, so that the drawn
  plots aren't deleted in the TProofDrawXXX's destructor.

- Removed TProofNTuple from TProofDrawTGraph.

- Put the initialization code of fFeedback and fPlayer (=MakePlayer())
  in TProof in to Init().

- Added TGraph::Merge(). Added TPolyMarker3D::GetPoint(Int_t, Float&,
  Float&, Float&).

- Removed TProofNTuple from TProofDrawPolyMarker3D.

- Fixed cleaning output lists after processing (set option = "nodelete").
  Now the objects are on the player outputlist and are removed (but not
  deleted) from the selector's outputlist.

- Fixed TPolyMarker3D::Merge() - it seems that nobody has ever tried to
  run this function.

- Added setting tree attributes (like MarkerStyle, MarkerSize, LineColor etc.)
  to a drawn TGraph and TPolyMarker3D in TProofDrawGraph and
  TProofDrawPolyMarker3D.

Revision 11251 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 7 09:15:45 2005 UTC (9 years, 10 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 8867 byte(s)
Diff to previous 11226
For back compatibility change names of some recently introduced functions.
	virtual Double_t GetErrorXhigh(Int_t bin) const;
	virtual Double_t GetErrorXlow(Int_t bin)  const;
	virtual Double_t GetErrorYhigh(Int_t bin) const;
	virtual Double_t GetErrorYlow(Int_t bin)  const;
	virtual Double_t *GetEXhigh() const
	virtual Double_t *GetEXlow()  const
	virtual Double_t *GetEYhigh() const
	virtual Double_t *GetEYlow()  const

Revision 11226 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 4 09:06:37 2005 UTC (9 years, 10 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 8651 byte(s)
Diff to previous 11161
From Anna Kreshuk:
- TLinearFitter class: Linear fitter is used to fit a set of data points with a linear
  combination of specified functions (with or without weights). The "linear" in the name
  stands for "linear in parameters", not variables. The main advantages,
  compared to a general non-linear fitter, is that the linear fitter is considerably
  faster and doesn't require setting the initial values of parameters.
  The linear fitter can be used directly or through TH1::Fit and TGraph::Fit functions
  When it's used directly, functions of more than 3 dimensions can be fitted.

- TFormula: a new data member fLinearParts and methods to process it are added. Now
  one can create a function of the type that can be fit by the linear fitter.
  Example: TFormula f("f", "x++sin(x)") is equivalent to
  TFormula f("f","[0]*x + [1]*sin(x)"), but if a TH1::Fit or a TGraph::Fit is performed
  with the 1st formula, it goes through the linear fitter, if it's performed with the
  2nd formula, it goes through Minuit.

- TMultiGraph class: the Fit method is implemented, allowing to fit all the graphs
  of a multigraph simultaneously

- TGraph, TGraphErrors, TGraphAsymmErrors, TGraphBentErrors - functions GetEXhigh(),
  GetEXlow(), GetEYhigh(), GetEYlow() implemented to simplify the GraphFitChisquare()
  function of the TFitter class

- TH1, TGraph, TGraph2D, TMultiGraph - changes in the Fit functions, allowing to use
  the linear fitter. Fitting with "polN" functions redirected to use the linear fitter,
  in cases where no options, except "range", are specified.

Revision 11161 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Feb 21 16:57:15 2005 UTC (9 years, 11 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 8469 byte(s)
Diff to previous 11125
Remove references to the unused kFitInit bit

Revision 11125 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 16 08:39:56 2005 UTC (9 years, 11 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 8501 byte(s)
Diff to previous 10857
n the previous version of TGraph::Fit, points were assumed to be given in increasing order along X. This restriction is removed in this new version.
The new implementation forces a change in the API of the following functions.
        virtual void     InitExpo(Double_t xmin=0, Double_t xmax=0);
        virtual void     InitGaus(Double_t xmin=0, Double_t xmax=0);
        virtual void     InitPolynom(Double_t xmin=0, Double_t xmax=0);
        virtual void     LeastSquareFit(Int_t m, Double_t *a, Double_t xmin=0, Double_t xmax=0);
        virtual void     LeastSquareLinearFit(Int_t n, Double_t &a0, Double_t &a1, Int_t &ifail, Double_t xmin=0, Double_t xmax=0);

Revision 10857 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jan 3 08:58:58 2005 UTC (10 years ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 8472 byte(s)
Diff to previous 10029
Add the two following virtual (and dummy) functions in TGraph:
  virtual Double_t* GetEX() const {return 0;}
  virtual Double_t* GetEY() const {return 0;}

Revision 10029 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 14 06:38:44 2004 UTC (10 years, 4 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 8364 byte(s)
Diff to previous 10002
Fix in all the TGraph classes. CtorAllocate should NOT be made virtual.
This is misleading since the 'virtual' part can not be used from within a constructor.

Minor fix in the example given in TGraphBentErrors (thanks Maxim Nikulin)

Revision 10002 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 13 12:27:11 2004 UTC (10 years, 4 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 8364 byte(s)
Diff to previous 9966
From Maxim Nikulin:
Improvement of the general TGraph suite memory management functions

Revision 9966 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 10 07:34:04 2004 UTC (10 years, 4 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 8178 byte(s)
Diff to previous 9908
From Maxim Nikulin:
Several improvements in the TGraph, TGraphErrors memory management
functions.
Added test (2 == sscanf(...)) in the TGraph::TGraph(const
char *filename, const char *format) constructor. It allows to skip empty
lines and comments like '# comment '. Similar TGraphErrors constructor
uses inaccurate field counting algorithm. It doesn't allow skipping
numbers using "*" modifier.

Revision 9908 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 6 06:54:55 2004 UTC (10 years, 4 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 7505 byte(s)
Diff to previous 9876
Set the 2nd and trd argument of TGraph::Drawgraph optional
  void DrawGraph(Int_t n, const Double_t *x=0, const Double_t *y=0, Option_t *option="");
if x or/anf y are null pointers, the fX or fY arrays are used, such that
calling mygraph.Draw(n) draws only the first n points of the graph.

Revision 9876 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 2 13:57:37 2004 UTC (10 years, 4 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 7500 byte(s)
Diff to previous 8473
Add a new transient data member
   Int_t fMaxSize;
Modify the function TGraph::SetPoint to double the size of the current
buffers when setting a point number >= fMaxSize.
In TGraph::Streamer (read mode) fMaxSize is set to fNpoints

Revision 8473 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Mar 22 15:56:53 2004 UTC (10 years, 10 months ago) by rdm
Original Path: trunk/graf/inc/TGraph.h
File length: 7356 byte(s)
Diff to previous 8431
make SetEditable() a *TOGGLE* context menu item.

Revision 8431 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 18 13:52:05 2004 UTC (10 years, 10 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 7297 byte(s)
Diff to previous 8414
Extend functionality of the new function TGraph::Eval
Double_t TGraph::Eval(Double_t x, TSpline *spline, Option_t *option) const
{
// Interpolate points in this graph at x using a TSpline
//  -if spline==0 and option="" a linear interpolation between the two points
//   close to x is computed. If x is outside the graph range, a linear
//   extrapolation is computed.
//  -if spline==0 and option="S" a TSpline3 object is created using this graph
//   and the interpolated value from the spline is returned.
//   the internally created spline is deleted on return.
//  -if spline is specified, it is used to return the interpolated value.

Revision 8414 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 17 07:52:22 2004 UTC (10 years, 10 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 7276 byte(s)
Diff to previous 8287
Add a new function
 Double_t Eval(Double_t x, TSpline *spline=0) const;
 // Interpolate points in this graph at x using a TSpline
 //  -if spline==0 a TSpline3 object is created using this graph
 //   and the interpolated value from the spline is returned.
 //   the internally created spline is deleted on return.
 //  -if spline is specified, it is used to return the interpolated value.

Make TGraph::GetPoint const

Revision 8287 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Feb 22 11:31:17 2004 UTC (10 years, 11 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 7187 byte(s)
Diff to previous 6418
Implement copy constructor for all TGraph family of classes

Revision 6418 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Apr 10 20:12:22 2003 UTC (11 years, 9 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 7153 byte(s)
Diff to previous 5602
New set of functions added to TGraph, TGraphErrors, TGraphAsymmErrors to sort
a graph via a standard predefined function in TGraph or a user defined function.
Thanks to Axel Naumann

Revision 5602 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Nov 16 15:17:47 2002 UTC (12 years, 2 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 6627 byte(s)
Diff to previous 5301
Make const the function ComputeRange in TGraph, TGraphErrors
   and TGraphAsymmErrors.
Rewrite TGraph::GetHistogram to create the histogram without
painting the graph.

Revision 5301 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Sep 15 19:45:15 2002 UTC (12 years, 4 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 6621 byte(s)
Diff to previous 4951
Use the plugin manager and the new interface TVirtualUtilPad instead
of hardwired calls to the interpreter.

Remove the now obsolete static function TGraph::RemoveFunction

Revision 4951 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 16 21:59:46 2002 UTC (12 years, 6 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 6688 byte(s)
Diff to previous 4925
Add new TGraph constructor to read data from a text file
 TGraph(const char *filename, const char *format="%lg %lg")
Example
 TGraph gr("basic.dat");
 gr.Draw("ap");

Revision 4925 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 16 08:04:21 2002 UTC (12 years, 6 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 6655 byte(s)
Diff to previous 4914
Implement two new TGraph constructors taking a TF1 as input.
        TGraph(const TF1 *f, Option_t *option="");
        TGraph(const char *fname, Option_t *option="");

Revision 4914 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 15 15:02:23 2002 UTC (12 years, 6 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 6548 byte(s)
Diff to previous 4912
Add functions FindObject.

Several mods in DistancetoPrimitive to take into account the new
TPaveStats logic.

Revision 4912 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 15 11:01:19 2002 UTC (12 years, 6 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 6424 byte(s)
Diff to previous 4713
Add new function TGraph::PaintFit. This new function is a subset of
THistPainter::PaintStat. TGraph::PaintGraph calls directly PaintFit
instead of TVirtualHistPainter::PaintStat.

Like for histograms, the TPaveStats stats box is now added to the
graph list of functions.

The destructor is modified to take into account the TPaveStats.

TGraph::SavePrimitive modified for the stats box.

Revision 4713 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 14 20:30:35 2002 UTC (12 years, 7 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 6379 byte(s)
Diff to previous 4411
Add new methods
  TGraph::RemovePoint(Int_t point)
  TGraphErrors::RemovePoint(Int_t point)
  TGraphAsymm::RemovePoint(Int_t point)

CagS: ----------------------------------------------------------------------

Revision 4411 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Apr 27 07:49:00 2002 UTC (12 years, 9 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 6327 byte(s)
Diff to previous 4407
Add new functions
  Bool_t   IsEditable() const;
  void     SetEditable(Bool_t editable=kTRUE); // *MENU*

By default a TGraph can be edited with the mouse. If SetEditable(kFALSE) is called,
the TGraph cannot be modified interactively.

Revision 4407 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Apr 26 10:20:01 2002 UTC (12 years, 9 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 6109 byte(s)
Diff to previous 4284
Change signature of TGraph::Fit. The function Fit returns an Int_t with the fit status.

Revision 4284 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 2 07:59:02 2002 UTC (12 years, 9 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 6109 byte(s)
Diff to previous 4279
Add a new constructor accepting a TH1* h as input argument.

Revision 4279 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 31 16:33:56 2002 UTC (12 years, 9 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 6079 byte(s)
Diff to previous 4268
New signatures for the following functions:
  void  InitExpo(Int_t first=0, Int_t last=0);
  void  InitGaus(Int_t first=0, Int_t last=0);
  void  InitPolynom(Int_t first=0, Int_t last=0);
  void  LeastSquareFit(Int_t m, Double_t *a, Int_t first=0, Int_t last=0);
  void  LeastSquareLinearFit(Int_t n, Double_t &a0, Double_t &a1, Int_t &ifail, Int_t first, Int_t last);

The global variables gxfirst and gxlast have been deleted.

Revision 4268 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 29 07:20:52 2002 UTC (12 years, 9 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 5957 byte(s)
Diff to previous 4265
Add two optional arguments in TGraph::Fit Axis_t xmin,Axis_t xmax (like in TH1::Fit).
These two arguments can be given to select a fit range.
//  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.

Revision 4265 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 28 16:55:25 2002 UTC (12 years, 10 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 5897 byte(s)
Diff to previous 3500
Move the functions LeastSquareFit and LeastSquareLinearFit from protected to public.

Revision 3500 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 19 14:21:54 2001 UTC (13 years, 1 month ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 5887 byte(s)
Diff to previous 3338
Add new functions to all the TGraph classes to interactively with the mouse
add a new point or remove a point. These new functions are available
from the context menu.
   Int_t InsertPoint();
   Int_t RemovePoint();

Add new function SetPointError in TGraphErrors and TGraphAsymmErrors.
This new function is also in the context menu.

Revision 3338 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Nov 30 15:46:21 2001 UTC (13 years, 1 month ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 5787 byte(s)
Diff to previous 3183
Add two new TGraph constructors accepting TVector, TVectorD as input:
        TGraph(const TVector  &vx, const TVector  &vy);
        TGraph(const TVectorD &vx, const TVectorD &vy);
The number of points in the graph is the minimum of vx and vy.

Revision 3183 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 7 16:54:07 2001 UTC (13 years, 2 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 5635 byte(s)
Diff to previous 3017
Add a new constructor accepting arrays of integers in addition to floats and doubles.
Add also new function DrawGraph with arrays of integers.

Revision 3017 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 12 07:49:41 2001 UTC (13 years, 3 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 5480 byte(s)
Diff to previous 2826
In all the TGraphX classes add a new method Apply suggested and implemented by

       Miroslav Helbich <helbich@mail.desy.de>
If one has points x,y of TGraph, sometimes it is convenient to apply a
function to those points e.g y=f(x,y). There are few examples I've been
dealing with, like scale the points by some number f(x,y)=y*scale factor
or if you try to fit some complicated formula it is sometimes better to do
the transformation first.

 For classes TGraphErrors and TGraphAssymErrors the situation becomes a
little bit more complicated since the error bars have to be changed.

Revision 2826 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 20 20:48:51 2001 UTC (13 years, 4 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 5440 byte(s)
Diff to previous 1714
In TGraph, add the following new functions:
        Double_t GetCorrelationFactor() const;
        Double_t GetCovariance() const;
        Double_t GetMean(Int_t axis=1) const;
        Double_t GetRMS(Int_t axis=1) const;

Revision 1714 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 28 07:20:48 2001 UTC (13 years, 10 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 5230 byte(s)
Diff to previous 1702
Change float* or double* to const float* or const double* in the following
functions:
   TGraph(Int_t n, const Float_t *x, const Float_t *y);
   TGraph(Int_t n, const Double_t *x, const Double_t *y);
   virtual void     DrawGraph(Int_t n, const Float_t *x, const Float_t *y, Option_t *option="");
   virtual void     DrawGraph(Int_t n, const Double_t *x, const Double_t *y, Option_t *option="");
   virtual void     PaintGraph(Int_t npoints, const Double_t *x, const Double_t *y, Option_t *option="");
   virtual void     PaintGrapHist(Int_t npoints, const Double_t *x, const Double_t *y, Option_t *option="");

Revision 1702 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Feb 26 09:41:33 2001 UTC (13 years, 10 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 5158 byte(s)
Diff to previous 1543
Remove unused member fOption. Change default FillColor from the canvas color
to 1 (black).

Revision 1543 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Feb 7 20:56:51 2001 UTC (13 years, 11 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 5202 byte(s)
Diff to previous 1225
New function TGraph::setHistogram(TH1 *h).
Implement TGraph::SavePrimitive. A graph with all its options,
including the associated histogram used to set the scale are asved.

Revision 1225 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 15 12:05:24 2000 UTC (14 years, 1 month ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 5127 byte(s)
Diff to previous 1205
Forgot to update the Streamer of these classes.

Revision 1205 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 13 15:13:57 2000 UTC (14 years, 1 month ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 5127 byte(s)
Diff to previous 1132
      W A R N I N G   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     ==================================================================
A very long list of changes in this pre-release of version 3.00.
We have modified the signature of many functions (in particular TObject)
to introduce more constness in the system.
You must change your code if your class derives from TObject and uses
one of the modified functions such as ls, Print, Compare, Hash, etc.
The modified functions in TObject have the following signature:
   virtual TObject    *Clone() const;
   virtual Int_t       Compare(const TObject *obj) const;
   virtual void        Delete(Option_t *option=""); // *MENU*
   virtual void        DrawClass() const; // *MENU*
   virtual void        DrawClone(Option_t *option="") const; // *MENU*
   virtual void        Dump() const; // *MENU*
   virtual TObject    *FindObject(const TObject *obj) const;
   virtual char       *GetObjectInfo(Int_t px, Int_t py) const;
   virtual ULong_t     Hash() const;
   virtual void        Inspect() const; // *MENU*
   virtual Bool_t      IsEqual(const TObject *obj) const;
   virtual void        ls(Option_t *option="") const;
   virtual void        Print(Option_t *option="") const;

A similar operation has been done with classes such as TH1, TVirtualPad,
TTree, etc.

Revision 1132 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 8 16:00:33 2000 UTC (14 years, 1 month ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 5059 byte(s)
Diff to previous 1111
Add TGraph::UseCurrentStyle

Revision 1111 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Dec 2 16:31:25 2000 UTC (14 years, 1 month ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 5015 byte(s)
Diff to previous 953
Add new function TGraph::Fit(TF1 *f1,..  in addition to TF1::Fit(const char *name,..

Revision 953 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Nov 21 20:23:14 2000 UTC (14 years, 2 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 4923 byte(s)
Diff to previous 548
Declare member fOption to be not persistent.

Revision 548 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Aug 31 17:00:59 2000 UTC (14 years, 4 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 5064 byte(s)
Diff to previous 343
Add new functions to set the number of points: TGraph::Set

Revision 343 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jul 10 06:07:45 2000 UTC (14 years, 6 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 5025 byte(s)
Diff to previous 149
Implement a version of TGraph::DrawGraph with arrays of floats in addition
to arrays of doubles.

Revision 149 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 13 10:57:49 2000 UTC (14 years, 7 months ago) by brun
Original Path: trunk/graf/inc/TGraph.h
File length: 4938 byte(s)
Diff to previous 3
  The internal dynamic arrays fX and fY have their type changed from Float_t to Double_t
  The members fMaximum, fMinimum changed from Float_t to Double_t
  class VersionID changed from 1 to 2.
  New constructor:
        TGraph(Int_t n);
  The arguments of the other constructors are now mandatory:
        TGraph(Int_t n, Float_t *x, Float_t *y);
        TGraph(Int_t n, Double_t *x, Double_t *y);
   The following functions have their arguments or return type
   changed from Float_t to Double_t:
        virtual void     ComputeRange(Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax);
        virtual void     DrawGraph(Int_t n, Double_t *x, Double_t *y, Option_t *option="");
        virtual Double_t GetErrorX(Int_t bin);
        virtual Double_t GetErrorY(Int_t bin);
        Double_t        *GetX() {return fX;}
        Double_t        *GetY() {return fY;}
        virtual void     GetPoint(Int_t i, Double_t &x, Double_t &y);
        virtual void     PaintGraph(Int_t npoints, Double_t *x, Double_t *y, Option_t *option="");
        virtual void     PaintGrapHist(Int_t npoints, Double_t *x, Double_t *y, Option_t *option="");
        virtual void     SetMaximum(Double_t maximum=-1111); // *MENU*
        virtual void     SetMinimum(Double_t minimum=-1111); // *MENU*
                void     Smooth(Int_t npoints, Double_t *x, Double_t *y, Int_t drawtype);
                void     Zero(Int_t &k,Double_t AZ,Double_t BZ,Double_t E2,Double_t &X,Double_t &Y
                          ,Int_t maxiterations);

- Mods in TGraph.cxx. See changes in TGraph.h.
  TGraph::Streamer modified to read old objects written in single precision.

Revision 3 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 16 17:00:58 2000 UTC (14 years, 8 months ago) by rdm
Original Path: trunk/graf/inc/TGraph.h
File length: 4804 byte(s)
Copied from: branches/rdm/graf/inc/TGraph.h revision 2
Diff to previous 2
This commit was generated by cvs2svn to compensate for changes in r2,
which included commits to RCS files with non-trunk default branches.

Revision 2 - (view) (download) (as text) (annotate) - [select for diffs]
Added Tue May 16 17:00:58 2000 UTC (14 years, 8 months ago) by rdm
Original Path: branches/rdm/graf/inc/TGraph.h
File length: 4804 byte(s)
Initial import of ROOT into CVS

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

Subversion Admin
ViewVC Help
Powered by ViewVC 1.0.9