Log of /trunk/hist/hist/src/TGraph.cxx
Parent Directory
Revision
48282 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jan 14 13:54:27 2013 UTC (2 years ago) by
moneta
File length: 85645 byte(s)
Diff to
previous 46970
clean up the parsing of the fit option in TH1::Fit and TGraph::Fit
add new option "P" (pearson chi square) for using expected error instead of observed one when fitting
Fix a bug for the case of parameter limits (defined in TF1): [-inf,b] or [a, +inf]
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: 85606 byte(s)
Diff to
previous 44213
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
44213 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu May 10 09:08:22 2012 UTC (2 years, 8 months ago) by
moneta
File length: 85526 byte(s)
Diff to
previous 44012
apply several fixes found by Coverity
In particular fix assignment operators (Copy) in TH1 and TGraph classes for memory leaks
Revision
41837 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Nov 9 16:04:19 2011 UTC (3 years, 2 months ago) by
rdm
File length: 84486 byte(s)
Diff to
previous 41333
From Filimon Roukoutakis and me:
Full port to AIX 7.1 and xlC Version: 09.00.0000.0017.
This port is complete (./configure --all; make) works (minus some minor
plugins that were not installed). The tutorials/benchmarks.C and test/* works.
For the list of linux-tool packages that need to be installed see:
http://root.cern.ch/drupal/content/build-prerequisites.
Port made on hardware kindly donated by IBM.
Revision
41077 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Sep 30 16:03:51 2011 UTC (3 years, 3 months ago) by
couet
File length: 82083 byte(s)
Diff to
previous 40198
The TGraph constructor from a file is now able to handle delimiters. Like in the .csv files. (Implementation done by Mathieu Trocme)
Revision
40180 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jul 11 09:32:19 2011 UTC (3 years, 6 months ago) by
couet
File length: 79412 byte(s)
Diff to
previous 38627
Use a greater precision to output the X and Y vectors. The following macro generated a wrong output (tmp.C).
void testGraphPrec(){
double offset=55.0;
TCanvas* myC = new TCanvas("myC","myC",600,400);
TGraph* gr=new TGraph();
for(int i=0;i<10;i++){
double point_x = 3.0+((double) i)*1e-7;
double point_y = offset+((double) i)*1e-8;
gr->SetPoint(i,point_x,point_y);
}
gr->Draw("AP");
myC->Print("tmp.C");
}
Revision
38627 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 25 15:15:10 2011 UTC (3 years, 10 months ago) by
couet
File length: 79311 byte(s)
Diff to
previous 38341
- Like "SetPoint" the method "Apply" modifies the graph content.
So, a logic similar to the one implemented in SetPoint should
be done, ie:
1) if fHistogram exists it is reset.
2) if gPad exist a gPad->Modified() is issued.
Revision
36518 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Nov 5 15:20:28 2010 UTC (4 years, 2 months ago) by
couet
File length: 79047 byte(s)
Diff to
previous 36493
- The foowwing macro generated a wrong .C file when its output
was saved as a .C file from the TCanvas' File menu.
{
TMultiGraph *multigraph = new TMultiGraph();
TGraph *graph = new TGraph(3);
graph->SetName("abcd_1");
graph->SetPoint(0,-4.,54.);
graph->SetPoint(1,-5.,55.);
graph->SetPoint(2,-6.,54.);
multigraph->Add(graph,"");
graph = new TGraph(3);
graph->SetName("abcd_2");
graph->SetPoint(0,-7.,57.);
graph->SetPoint(1,-8.,58.);
graph->SetPoint(2,-9.,57.);
multigraph->Add(graph,"");
multigraph->Draw("af");
}
Revision
32930 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Apr 9 16:18:32 2010 UTC (4 years, 9 months ago) by
pcanal
File length: 76886 byte(s)
Diff to
previous 32832
Prefer the use of InheritsFrom(TClass*) over InheritsFrom(const char*) as long as
it does not increase the library dependencies.
Revision
31604 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Dec 7 19:04:33 2009 UTC (5 years, 1 month ago) by
moneta
File length: 76670 byte(s)
Diff to
previous 31491
- fix a problem returning the covariance matrix when fit failed. Now all minimizer implements CovMatrixStatus() when they calculate the covariance matrix. Add in FitResult method to return covariance matrix status
- Add a flag in interface of Minimizer::GetMinosError to do separatly positive or negative errors
- fix usage of default minimizer from what is defined in etc/system.rootrc
- improve comment in TH1::Fit and TGraph::Fit for usage of TFitResultPtr
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: 73502 byte(s)
Diff to
previous 31362
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: 72304 byte(s)
Diff to
previous 30750
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
30750 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Oct 15 16:38:46 2009 UTC (5 years, 3 months ago) by
brun
File length: 71309 byte(s)
Diff to
previous 30393
From Matthew Strait:
This patch improves the documentation for TGraph::Fit. It:
Adds and removes spaces where needed
Fixes spelling and grammar errors
Wraps long lines and, in one case, unwraps short lines
Capitalizes and adds periods
Clarifies that the "F" option "uses" rather than "switches to" the minuit fitter ("switches to" could be read as a global switch)
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: 70043 byte(s)
Diff to
previous 28483
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
28467 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed May 6 13:30:32 2009 UTC (5 years, 8 months ago) by
couet
File length: 68058 byte(s)
Diff to
previous 28256
- The fix done in revision 28200 had a bad side effect,
the following macro did not work anymore:
{
TCanvas* can = new TCanvas();
can->SetLogx();
can->SetLogy();
TGraph* gra = new TGraph();
for (int i = 0; i < 10; i++) gra->SetPoint(i, i + 1, i + 1);
gra->SetTitle("title;x;y");
gra->GetXaxis()->SetLimits(1e-2, 1e2);
gra->GetHistogram()->SetMinimum(1e-2);
gra->GetHistogram()->SetMaximum(1e2);
gra->GetXaxis()->CenterTitle();
gra->GetYaxis()->CenterTitle();
gra->Draw("a*");
}
This is now fixed.
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: 67411 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: 76193 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
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/src/TGraph.cxx
File length: 73245 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
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/src/TGraph.cxx
File length: 156546 byte(s)
Diff to
previous 22827
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
22419 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Mar 3 00:25:01 2008 UTC (6 years, 10 months ago) by
rdm
Original Path:
trunk/graf/src/TGraph.cxx
File length: 156077 byte(s)
Diff to
previous 21587
From Andrew Savchenko:
ROOT can not be compiled with gcc-4.3.
Some ROOT source files doesn't contain required #include directives,
for example, they use strlen(), but #include <string.h> is missed or
malloc() is used and #include <stdlib.h> is missed.
Earlier versions of gcc allowed some headers to be included implicitly,
but issued a warning (-Wimplicit-function-declaration). Newer one,
gcc-4.3 denies such silly behaviour: all required headers must be explicitly
included.
Attached patch fixes this. Also it fixes another issue, which disallows
ROOT to compile under gcc-4.3: C functions don't belong to namespace std,
so expressions like std::memcpy() are no longer valid and plain memcpy()
should be used instead.
Revision
21587 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jan 8 15:34:15 2008 UTC (7 years ago) by
couet
Original Path:
trunk/graf/src/TGraph.cxx
File length: 156057 byte(s)
Diff to
previous 21231
In PaintGraph fHistogram's limits are computed with some margins. The new
minimum along x is stored in "uxmin" and the new minimum along y in "minimum".
In some cases the new minimum can be negative whereas the real minimum is
positive. In such case, the new minimum was set to 90% of the real minimum
in case of log scale, and to 0 in case of linear scale. Setting to 0 in case
of linear scale, was not a good idea because if the pad is turned into log
scale later on, then some points close to the real mimimum are not visible.
The following macro demonstrate the problem:
{
Double_t x[2];
Double_t y[2];
x[0]= 200; y[0]=2.0271;
x[1]=3e+06; y[1]=0.0005;
TGraph *gr = new TGraph(2,x,y);
gr->Draw("alp");
gr->SetMarkerStyle(20);
gPad->Update();
gPad->SetLogx();
gPad->SetLogy();
}
Now, when the new computed minimum is negative and when the real minimum is
positive, the new minimum is set to 90% of the real minimum in both log and
linear scale.
Revision
20335 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Oct 13 14:19:50 2007 UTC (7 years, 3 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 156215 byte(s)
Diff to
previous 20308
Change TGraph::ComputeRange to compute the x/y range of the graph.
Move code previously in TGraph::PaintGraph or TGraph::PaintGrapHist to TGraph::ComputeGraph.
The functions like TGraphErrors::ComputeGraph call first TGraph::ComputeRange.
--achis line, and those below, will be ignored--
M graf/src/TGraph.cxx
M graf/src/TMultiGraph.cxx
M graf/src/TGraphErrors.cxx
M graf/src/TGraphAsymmErrors.cxx
M graf/src/TGraphBentErrors.cxx
Revision
20297 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Oct 10 16:20:03 2007 UTC (7 years, 3 months ago) by
couet
Original Path:
trunk/graf/src/TGraph.cxx
File length: 156554 byte(s)
Diff to
previous 19826
- The SavePrimitive mechanism did not work properly. In particular
it was not possible to save various kind of graphs in several multigraph
in the same macro. Also in case of TGraph the generated macro was wrong
(Add() was missing).
- Make the help in the THTML style
- coding convension
Revision
18608 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Apr 27 08:36:23 2007 UTC (7 years, 8 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 156220 byte(s)
Diff to
previous 18589
iImplement the following return status from TGraph::Fit:
The function return the status of the fit in the following form
fitResult = migradResult + 10*minosResult + 100*hesseResult
The fitResult is 0 is the fit is OK.
The fitResult is negative in case of an error not connected with the fit.
Revision
18589 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Apr 25 14:59:12 2007 UTC (7 years, 9 months ago) by
couet
Original Path:
trunk/graf/src/TGraph.cxx
File length: 155801 byte(s)
Diff to
previous 18575
- Apply the valid fix suggested here: https://savannah.cern.ch/bugs/?25788
"TGraph::PaintGrapHist shifts points by half-a-bin when painting
lines in low-res". The following macro show the problem:
void lowRes(int nbins=10000) {
c = new TCanvas("lowRes","lowRes",0,0,700,800);
TH1F *h1 = new TH1F("h1","my histogram",nbins,-3,3);
for (int i=0;i<1000000;i++) h1->Fill(gRandom->Gaus(0,1));
h1->SetMarkerStyle(20); h1->Draw("EP");
TH1F *h12 = h1->DrawCopy("l same");
h12->SetLineColor(kRed);
h1->GetXaxis()->SetRange(1,40);
}
Before this fix the line plot and the error plot were shifted.
Revision
17727 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Feb 6 14:35:45 2007 UTC (7 years, 11 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 154910 byte(s)
Diff to
previous 17587
In the Streamer functions replace the lines like
TPad::Class()->ReadBuffer(b, this, v, R__s, R__c);
TPad::Class()->WriteBuffer(b,this);
by
b.ReadClassBuffer(TPad::Class(), this, v, R__s, R__c);
b.WriteClassBuffer(TPad::Class(),this);
Revision
17587 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jan 30 17:26:35 2007 UTC (7 years, 11 months ago) by
couet
Original Path:
trunk/graf/src/TGraph.cxx
File length: 154901 byte(s)
Diff to
previous 17581
- Option chopth should be initialized to " " in PaintGrapHist otherwise the
following macro draws am horizontal line at 0:
{
TCanvas c1;
TGraph g;
g.SetPoint(0, -1,-1);
g.SetPoint(1, 0, 0);
g.SetPoint(2, 1, 1);
g.Draw("A*");
}
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/src/TGraph.cxx
File length: 154928 byte(s)
Diff to
previous 16580
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
16580 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Oct 20 16:00:40 2006 UTC (8 years, 3 months ago) by
couet
Original Path:
trunk/graf/src/TGraph.cxx
File length: 153014 byte(s)
Diff to
previous 16535
- In DistanceToPrimitive() the test to see if "the point (px,py) is not in
the graph area" was done too late. Therefore the TGraph was picked outside
the pad limits. In particular it hide the TAxis in case of zoom.
Revision
16279 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Sep 15 15:16:57 2006 UTC (8 years, 4 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 152986 byte(s)
Diff to
previous 16263
From Anna:
- TFormula::EvalPar() is not changing parameters (the fParams data member) when a user passes his own uparams array as a second argument. Before - sometimes it did, sometimes it didn't.
- TF1::GradientPar() is now 0 on fixed parameters
- TFitter::GetConfidenceIntervals() is now taking the fixed parameters into account
- TLinearFitter::GetConfidenceIntervals() is now taking the fixed parameters into account
- TLinearFitter::FixParameter() can now be called before a first fit is performed (an accidently found bug :))
- TLinearFitter::Eval() now returns 1 if there are errors in the fit. According changes in:
--TH1
--TGraph
--TGraph2D
--TMultiGraph
Revision
16203 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Sep 5 09:39:39 2006 UTC (8 years, 4 months ago) by
couet
Original Path:
trunk/graf/src/TGraph.cxx
File length: 152943 byte(s)
Diff to
previous 15672
- Several improvements in the exclusion zone algorithm (PaintPolyLineHatches):
* Some parts of the exclusion were sometimes drawn on the wrong side of the
graph.
* Special (simpler) case when the graph is vertical or horizontal.
* Make sure that two consecutive points are not equal (it produced a
division by zero)
* Improvement in the graph closing. The added point to close the graph was
sometimes on the wrong side of the curve.
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/src/TGraph.cxx
File length: 153122 byte(s)
Diff to
previous 15171
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/src/TGraph.cxx
File length: 153066 byte(s)
Diff to
previous 15048
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
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/src/TGraph.cxx
File length: 151257 byte(s)
Diff to
previous 14336
- 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
14336 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Mar 20 21:43:44 2006 UTC (8 years, 10 months ago) by
pcanal
Original Path:
trunk/graf/src/TGraph.cxx
File length: 145204 byte(s)
Diff to
previous 14038
Reduce direct dependencies on TClass.h, TROOT.h and TStreamerInfo.h.
Warning: This means that some file that relied on the indirect
inclusion of these header file might now fail to compile with
an error message mention that gROOT is no known or that TClass,
TROOT or TStreamerInfo is incompletely defined. Simply add the
proper include directive.
Revision
13330 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Nov 23 17:18:06 2005 UTC (9 years, 2 months ago) by
couet
Original Path:
trunk/graf/src/TGraph.cxx
File length: 145309 byte(s)
Diff to
previous 13269
- PaintGrapHist:
The following example produced a wrong output:
{
hpx1 = new TH1F("hpx1","hpx1",100,-4,4);
hpx2 = new TH1F("hpx2","hpx2",100,-4,4);
Float_t px, py;
for (Int_t i = 0; i < 25000; i++) {
gRandom->Rannor(px,py);
hpx1->Fill(px);
hpx2->Fill(px);
hpx2->Fill(py);
}
hpx1->SetFillColor(2);
hpx1->SetFillStyle(3004);
hpx1->Draw("LF2");
hpx2->SetFillColor(1);
hpx2->SetFillStyle(3005);
hpx2->Draw("LF2 same");
}
The black histogram was not completly hatched.
Revision
13229 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Nov 14 16:34:17 2005 UTC (9 years, 2 months ago) by
couet
Original Path:
trunk/graf/src/TGraph.cxx
File length: 145067 byte(s)
Diff to
previous 13107
- As indicated in the help of THistPainter::Paint, the option "A" used on
histograms means "do NOT DRAW the axis". This option worked properly on lego
and surfaces plots but not on 1D histograms and on "flat" 2D plots. Now it
is hopefully working in all cases.
A first attempt to make it work has been done in revision 1.226 of
THistPainter. But it was tagged as "catastrophic" in revision 1.228 because
it was not anymore possible to draw the TGraph axis.
Indeed, for historical reasons, the option "A" applied on TGraph means
exactly the opposite: "start a new plot and DRAW the axis".
So the needed modifications were a bit more complex than the ones done in
revision 1.226 of THistPainter. Actually some mods are needed in:
* THistPainter::PaintAxis: return if Hoption.Axis == -1 (option "A").
That was the "catastrophic" change of revision 1.226.
* THistPainter::PaintTable: Hoption.Axis<=0 replaces !Hoption.Axis.
* TGraph::PaintGraph: fHistogram->Paint(" ") replaces fHistogram->Paint("a").
* TPad::DrawFrame: hframe->Draw(" ") replaces hframe->Draw("a").
Revision
13107 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Nov 1 19:48:09 2005 UTC (9 years, 2 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 144990 byte(s)
Diff to
previous 13006
From Anna Kreshuk:
- changes in TFumili::GraphFitChisquareFumili to use the effective variance
method in case of errors in x and y
- improved comments for TGraph::Fit and TFitter::GraphFitChisquare for this
case
Revision
12726 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Sep 16 17:19:40 2005 UTC (9 years, 4 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 144426 byte(s)
Diff to
previous 12643
From Ilka:
- changes in TStyle::Reset(Option_t opt) to have a real reset of any of the 5
default styles in root according to the parameter opt that containg the style
name;
- fixes in several slots of TStyleManager where the signal information was
ignored;
- fixes in the methods UseCurrentStyle() of TGraph, TH1, TPad;
- new method UseCurrentStyle() of TPaveStats;
Revision
12136 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jun 23 10:04:08 2005 UTC (9 years, 7 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 143227 byte(s)
Diff to
previous 11813
From Anna Kreshuk:
Methods to compute Least trimmed squares regression coefficients
were added to the TLinearFitter class.
Now robust linear fitting can be performed for the datasets, in which
outliers influence the ordinary least-squares fit. The maximal breakdown
point of the algorithm is |(floor((n-p)/2) +1)/n, which means that
LTS fit stays in a bounded region whenever floor((n-p)/2) or fewer
observations are replaced by arbitary points.
The implementation is based on the article "Computing LTS regression
for Large Data Sets" by Peter J. Rousseeuw and Katrien Van Driessen.
Revision
11813 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed May 18 12:31:10 2005 UTC (9 years, 8 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 142269 byte(s)
Diff to
previous 11788
From Valeriy Onuchin:
this patch fixes all compilation problems for
ROOT under windows with VC6 compiler.
- The main problem is that VC6 compiler does not recognize
"long long" type in rootcint generated dictionaries,
To fix this, wherever "long long" type was writen in dictionary file it was
replaced with native win32 "long long" type_string "__int64".
Modified files are: cint/src/val2a.c, cint/src/newlink.c, cint/src/Class.cxx
Other changes:
- many classes contained "list" variables.
That produced name_clash with std::list class name.
- many classes contained
for (int i=0; ..) {..}
for (int i=0; ..) {..}
which caused "duplication of initialisation" bug.
- gl/src/CsgOps.cxx had outside declared templated parameter used inside
internal function.
- TString Atoi, Atof - std namespace was removed.
_ TASimage - custom Streamer was changed. Reading/writing class version
was added. That allows to keep "future compatibility"/"schema evolution"
Demo files galaxy.root, gallery.root were rewritten.
- I rolled back changes in TGPicture class which are related to reading
of XPM files because of problems under win32.
- TASImage::GetMask method was reimplemented.
- libAfterImage.tar.gz - fix all compilation problem under win32 (vc6)
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/src/TGraph.cxx
File length: 142147 byte(s)
Diff to
previous 11692
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
11605 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Apr 17 14:12:50 2005 UTC (9 years, 9 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 141329 byte(s)
Diff to
previous 11430
From Anna Kreshuk:
Some fixes for the linear fitter, some cosmetic changes in the
TH1, TGraph, TMultigraph and TGraph2D, and also the new fitting option
"F", which allows to switch to minuit when fitting a polN.
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/src/TGraph.cxx
File length: 141003 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/src/TGraph.cxx
File length: 140392 byte(s)
Diff to
previous 11231
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/src/TGraph.cxx
File length: 140367 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
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/src/TGraph.cxx
File length: 137833 byte(s)
Diff to
previous 11111
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
10763 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Dec 13 15:49:10 2004 UTC (10 years, 1 month ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 137975 byte(s)
Diff to
previous 10480
From Olivier:
- The last fix (revision 1.145) in TGraph::PaintGraph was incomplete. The
following macro didn't show the negative part of the plot (because an
empty fHistogram was created by SetTitle("X title")).
{
const Int_t n = 64;
Double_t x[n], y[n];
for (Int_t i=0;i<n;i++) {
x[i] = i*0.1;
y[i] = 10*sin(x[i]+0.2);
}
gr = new TGraph(n,x,y);
gr->GetXaxis()->SetTitle("X title");
gr->Draw("ACP");
}
Revision
10480 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Nov 5 11:17:34 2004 UTC (10 years, 2 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 137706 byte(s)
Diff to
previous 10386
From Olivier:
- After having executed the following macro, one got an error trying to
set the Y Log scale from the pad pull down menu.
{
double y[3] = {0.1,.8,10};
double x[3] = {1,2,3};
TGraph graph(3,x,y);
graph->Draw("A*");
}
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/src/TGraph.cxx
File length: 139903 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/src/TGraph.cxx
File length: 137255 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/src/TGraph.cxx
File length: 137157 byte(s)
Diff to
previous 9821
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
9792 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 20 08:07:30 2004 UTC (10 years, 5 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 136403 byte(s)
Diff to
previous 9553
In TGraph::DistancetoPrimitive when looping on list of associated functions
TF1::DistancetoPrimitive is called with -px instead of px to instruct
TF1::DistancetoPrimitive to not look in the histogram axis.
Revision
9553 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jul 20 07:23:34 2004 UTC (10 years, 6 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 136402 byte(s)
Diff to
previous 9505
The selected pad and selected object are now passed as arguments
when creating the DrawPanel and Fitpanel, instead of using
the global pointers obtained via gROOt->GetSelectedPad.
This may fix some problems seen with the Qt version.
Revision
9505 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jul 12 20:06:33 2004 UTC (10 years, 6 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 136480 byte(s)
Diff to
previous 9407
From Olivier:
New options in TGraphErrors::Paint, TGraphAsymmErrors::Paint and in
TGraphBentErrors::Paint :
if option "3" is specified a filled area is drawn through the end
points of the vertical error bars.
if option "4" is specified a smoothed filled area is drawn through
the end points of the vertical error bars.
Example:
{
gROOT->Reset();
c1 = new TCanvas("c1","A Simple GraphErrors Example",200,10,700,500);
const Int_t n = 20;
Double_t x[n], y[n], ex[n], ey[n];
for (Int_t i=0;i<n;i++) {
x[i] = i*0.1;
y[i] = 10*sin(x[i]+0.2);
ex[i] = 0.08;
ey[i] = 0.1*i;
}
gr = new TGraphErrors(n,x,y,ex,ey);
gr->Draw("A3");
}
Revision
9407 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jul 6 14:48:42 2004 UTC (10 years, 6 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 136382 byte(s)
Diff to
previous 9285
Improvement in TGraph::Fit:
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.
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/src/TGraph.cxx
File length: 134036 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/src/TGraph.cxx
File length: 133151 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
7920 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jan 16 13:32:46 2004 UTC (11 years ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 131887 byte(s)
Diff to
previous 7854
Replace the calls to fFunctions->Delete in the destructors and Reset
functions by an explicit loop to take into account the case of the same
object (with different drawing options) being added to the same list.
This, in principle, should be covered by the "slow" option in TList::Delete,
but the logic does not work. To be revesited!
Revision
7854 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jan 6 17:39:06 2004 UTC (11 years ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 131575 byte(s)
Diff to
previous 7640
Modify TGraph::Browse to use the environment variable TGraph.BrowseOption.
By default the option is "alp" and can be modified by:
adding a line with TGraph.BrowseOption: myoption
calling gEnv->SetValue("TGraph.BrowseOption",myoption)
Revision
7629 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Nov 22 21:48:18 2003 UTC (11 years, 2 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 131491 byte(s)
Diff to
previous 7489
Accept option "same" in TGraph::Draw and TGraph::PaintGraph.
The option is dummy. It is introduced for consistency with
other high level classes (TH1, TTree). It eliminates
the problem with the native option "a" of TGraph.
Revision
6539 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon May 5 16:38:34 2003 UTC (11 years, 8 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 129890 byte(s)
Diff to
previous 6480
Many changes in TGraph::Fit to use the new TVirtualFitter extended interface.
The static functions GraphFitChisquare has been moved to TFitter.
The global variables :
TF1 *grF1
TVirtualfitter *grFitter
have been deleted and replaced by functions from TVirtualFitter.
Revision
6445 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Apr 14 16:54:31 2003 UTC (11 years, 9 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 131658 byte(s)
Diff to
previous 6418
From Olivier.
Implement new histogram drawing option "]["
When this option is specified, the vertical lines for the first and last bin
are not drawn.
This option is interesting when superimposing many histograms on the same picture.
Revision
6312 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Mar 17 13:02:21 2003 UTC (11 years, 10 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 127461 byte(s)
Diff to
previous 6253
From Olivier:
THistPainter::PaintHist
- In case of option "line" the center of the bin was used to fill
the vector pass to TGraph::PaintGrapHist. This generated
incompatibilities when option "line" was used with other options.
- Clean up, removed a lot of useless code.
TGraph::PaintGrapHist:
- Take into account the modification done in THistPainter::PaintHist
- In case of low resolution the histogram drawing was shifted by
one bin on the left.
Revision
5717 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Dec 2 18:50:12 2002 UTC (12 years, 1 month ago) by
rdm
Original Path:
trunk/graf/src/TGraph.cxx
File length: 127472 byte(s)
Diff to
previous 5707
mega patch to remove almost all compiler warnings on MacOS X where the
compiler is by default in pedantic mode (LHCb also like to use this option).
The following issues have been fixed:
- removal of unused arguments
- comparison between signed and unsigned integers
- not calling of base class copy ctor in copy ctor's
To be done, the TGeo classes where we get still many hundred warnings of
the above nature. List forwarded to Andrei.
Revision
5125 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Aug 15 14:18:32 2002 UTC (12 years, 5 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 125777 byte(s)
Diff to
previous 5094
Add a new option "P0" in THistPainter::Paint and equivalent change
in TGraph::PaintGrapHist.
// "P" : Draw current marker at each bin except empty bins
// "P0" : Draw current marker at each bin including empty bins
Revision
5094 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 9 08:29:07 2002 UTC (12 years, 5 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 125405 byte(s)
Diff to
previous 5084
Add a new entry Hoption.HighRes in Hoption_t. By default Hoption.HighRes =0.
It is non zero when the option "High Resolution 9 is selected in TH1::Draw.
The option low resolution is automatically selected in TGraph::PaintGrapHist
when the number of points is greater than the number of bins in the pad.
However, for some pathological cases (difficult to detect automatically)
like the example below, it is necessary to force high resolution.
{
TH1F* h1=new TH1F("hist","hist",2048,0,2048);
for(int i=0; i<1024;i++){
h1->SetBinContent(i*2,i);
h1->SetBinContent(i*2+1,5);
}
h1->SetMarkerColor(2);
h1->SetMarkerStyle(21);
h1->Draw("p9"); //without option 9 result is not good
}
Revision
5018 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Jul 28 06:38:09 2002 UTC (12 years, 6 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 124741 byte(s)
Diff to
previous 4952
n TGraph::Fit and GraphFitChisquare, improvements by Eddy Offermann
to recompute the errors on parameters in case errors on the points
are not available (case of TGraph in particular).
Add a protection in TGraph::PaintFit in case the fit option was not
requested.
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/src/TGraph.cxx
File length: 120944 byte(s)
Diff to
previous 4889
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
4889 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jul 12 10:22:35 2002 UTC (12 years, 6 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 116900 byte(s)
Diff to
previous 4713
Simplify the algorithm in GraphFitChisquare in case the errors in x and y are null.
In this case the error is estimated by taking the difference of the function
at x+epsilon and x-epsilon 9with epsilon = x range/1000).
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/src/TGraph.cxx
File length: 118103 byte(s)
Diff to
previous 4636
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/src/TGraph.cxx
File length: 118380 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
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/src/TGraph.cxx
File length: 114719 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/src/TGraph.cxx
File length: 114273 byte(s)
Diff to
previous 4125
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
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/src/TGraph.cxx
File length: 113853 byte(s)
Diff to
previous 3477
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/src/TGraph.cxx
File length: 110929 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
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/src/TGraph.cxx
File length: 107712 byte(s)
Diff to
previous 2918
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
2598 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jul 19 17:12:25 2001 UTC (13 years, 6 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 105619 byte(s)
Diff to
previous 2463
When a TF2 was created with an interpreted or compiled function,
it was not possible to save the TF2 object in a file and read it
in a separate program because TF2 does not save the code of the
interpreted function. Only TF2s created with inline expressions
could be paint in a separate session.
In TF1, we already had the logic to save an array fSave with
the function values created at fNpx points. TF2 has been modified
to provide the same functionality. One can save a TF2 and draw it
again in a new session.
To implement this feature, the signature of the function TF1::Save
has been modified to be general for 1,2 and 3-d functions.
The classes TH1 and TGraph where TF1::Save was called have been
modified accordingly.
Revision
2375 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jun 5 13:51:13 2001 UTC (13 years, 7 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 105495 byte(s)
Diff to
previous 2237
Modify the functions:
TGraph::Fit
TH1::Fit
TTreePlayer::UnbinnedFit
to call TF1::SetNDF(ndf) where ndf is the number of degrees of freedom
taking into account the number of points used in the fit minus the
number of free parameters.
Revision
1752 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Mar 5 22:48:46 2001 UTC (13 years, 10 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 105403 byte(s)
Diff to
previous 1714
Fix by Damir Buskulic in TGraph::PaintGraph in the fast/low resolution mode.
Damir says
"I found another small bug in eddy's code that allow fast drawing of
many-bins histos. Just before using the PaintPolyLine() routine, the
calculation of the start and end of the line should be a little bit
adjusted.
In fact, gPad->AbsPixeltoX seems to return the X position of one edge of a
pixel. PaintPolyLine may be confused in that case and give wrong results,
painting the adjacent pixels instead of the desired one.
The net effect is that from time to time one sees emty vertical lines
where ther is obviously data. The position of these lines depend on the
size of the pad."
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/src/TGraph.cxx
File length: 105301 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
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/src/TGraph.cxx
File length: 103128 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
1112 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Dec 2 16:34:10 2000 UTC (14 years, 1 month ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 102398 byte(s)
Diff to
previous 985
Fix a problem in TGraph::PaintGraph when redrawing a TGraph in log scales.
With the new logic, one can:
- switch between log and lin scales.
- zoom/unzoom a TGraph when the pad range is defined via an histogram
or via TPad::DrawFrame.
Revision
549 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Aug 31 17:05:44 2000 UTC (14 years, 4 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 101764 byte(s)
Diff to
previous 428
Add new functions:
TGraph::Set(Int_t np)
TGraphErrors::Set(Int_t np)
to modify the number of points in the graph without destroying
the existing points.
In TGraph::PaintGraph, the intermediate histogram created when the option "A"
is specified has now a number of channels greater or equal to the number
of points in the graph. This permits to zoom a graph without limitations.
Revision
425 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Aug 7 12:25:07 2000 UTC (14 years, 5 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 100944 byte(s)
Diff to
previous 396
Change the number of points that can be drawn in one bunch from 204 to 2052.
Implement a new algorithm by Eddy Offermann used when the number of points
to be drawn exceeds the screen resolution.
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/src/TGraph.cxx
File length: 96639 byte(s)
Diff to
previous 78
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
69 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jun 5 07:26:31 2000 UTC (14 years, 7 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 95557 byte(s)
Diff to
previous 59
- Add symbols #perp, #parallel and #odot in TLatex
New function TLatex::DrawCircle
TLatex::DrawParenthesss rewritten
- Several mods in TGraph fitting functions to allow fitting in a sub range
with points not in increasing order.
Revision
59 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed May 31 07:49:13 2000 UTC (14 years, 7 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 95257 byte(s)
Diff to
previous 47
- Add possibility to specify a User fitting function in TGraph::Fit:
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);
Revision
47 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon May 29 06:19:21 2000 UTC (14 years, 7 months ago) by
brun
Original Path:
trunk/graf/src/TGraph.cxx
File length: 94647 byte(s)
Diff to
previous 3
// 29 May
- Add the following note in the TPave, TPaveLabel and TPaveText constructors:
IMPORTANT NOTE:
Because TPave objects (and objects deriving from TPave) have their
master coordinate system in NDC, one cannot use the TBox functions
SetX1,SetY1,SetX2,SetY2 to change the corner coordinates. One should use
instead SetX1NDC, SetY1NDC, SetX2NDC, SetY2NDC.
28 May
- Modify THistPainter::PaintStat and PaintStat2 to use the TLatex character #pm
instead of +-
// 27 May
- Add new member functions:
Int_t TVirtualTreePlayer::GetDimension()
Int_t TTreePlayer::GetDimension()
GetDimension returns the number of dimensions in the TTree::Draw expression.
- Add new function in TTree;
void TTree::UnbinnedFit(const char *funcname ,const char *varexp, const char *selection="",Option_t *option=""
,Int_t nentries=1000000000, Int_t firstentry=0);
This function (origin Stephen Bailey) performs an unbinned fit to the
variable(s) given in varexp.
- Remove unused data member fDimension from class TTree.
- Introduce support for "Virtuality" in TLeafObject.
New data member fVirtual added and corresponding IsVirtual/SetVirtual functions.
By default, fVirtual is kTRUE.
This change allows new interesting possibilities in split mode. For example
if a member is TShape *fShape, a real object may be now of any type
derived from TShape (eg, TTUBE, TBRIK, etc).
With the previous version, the fShape object had to be of the declared
type TShape only.
When writing a TLeafObject, the class name of the object is now written in
the branch buffer by TLeafObject::FillBasket. When TLeafObject::ReadBasket
is called, an instance of the real class is built and its Streamer function
called.
This change is backward compatible. Old files can still be processed.
It is possible to set the virtuality for the branch to kFALSE via
TLeafObject::SetVirtual. Setting the virtuality to kFALSE makes
writing and reading faster and the file slightly smaller. In this case,
a TLeafObject must be of the type declared only.
- New minor changes in TGaxis (Damir Buskulic) for date/time format
in case the start time is not an integer value.
- Modify tutorial psexam.C to set the TPaveText TextFont to 61 instead of 62.
Font precision 1 bypass the TLatex logic.
- Mods in TLatex to remove the special treatment for characters ' and ".
Strings like l'#acute{e}toile are now correctly processed.
- Fix a bug in TGraph::GetFunction. (thanks Damon Spayde). The test
if (fFunctions) return 0; replaced by
if (!fFunctions) return 0;
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.