Log of /trunk/hist/histpainter/src/THistPainter.cxx
Parent Directory
Revision
48447 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Feb 1 13:07:58 2013 UTC (23 months, 3 weeks ago) by
moneta
File length: 341684 byte(s)
Diff to
previous 48442
from Gabriel:
- deprecated GetCellContent / GetCellError / SetCellContent / SetCellError -> GetBinContent / GetBinError/ SetBinContent / SetBinError provide the same functionality ; replaced these methods across ROOT (still in graf2d and main)
- replaced SetCellError / SetCellContent / GetCellError / SetCellConten
- refactored redundant logic (GetContourLevel, SetContent, Interpolate, SetBufferSize)
- moved one-line methods to header file (SetMinimum, SetMaximum, GetXaxis, GetYaxis, GetZaxis, GetBinError)
- TH2::Rebin2D has been simplified (6 for loops -> 3 for loops) => 2-3x speedup
Revision
47842 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Dec 5 09:54:57 2012 UTC (2 years, 1 month ago) by
couet
File length: 341786 byte(s)
Diff to
previous 46268
Fit parameters with very long name destroyed the stats display.
Example:
{
gStyle->SetOptFit(111);
TH1F *hist = new TH1F("hist","hist",100,-5,5);
TF1 *fit = new TF1("fit","gaus",-5,5);
fit->SetParName(2,"Parameter with very very very very long name");
hist->FillRandom("gaus",5000);
hist->Draw();
hist->Fit(fit);
}
Revision
46268 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Oct 2 13:16:29 2012 UTC (2 years, 3 months ago) by
moneta
File length: 341698 byte(s)
Diff to
previous 45923
Fix computation of underflow/overflows in statistic box displayed for 2d histogram.
This was broken after changes in TAxis::SetRange, when setting ranges including underflow/overflows
Revision
45899 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Sep 7 09:11:14 2012 UTC (2 years, 4 months ago) by
moneta
File length: 341808 byte(s)
Diff to
previous 45764
- Add in THistPainter::GetObjectInfo the case of TProfile2D to print also bin entries and bin error
and disable printing bin information for 3D objects. Print in that case only x and y
_ Remove TProfile::GetObjectInfo, use now the inherited one from TH1 which is impelmented using THistPainter::GetObjectInfo
Revision
44675 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jun 13 15:42:55 2012 UTC (2 years, 7 months ago) by
couet
File length: 339532 byte(s)
Diff to
previous 44517
Make sure the 2D drawing options COL, ARR, CONT and BOX are ignored when used to plot a 1D histogram. 1D histograms plotted with one of these options is now drawn with the default 1D plotting option. This is useful when the default option in the TBrowser is, for instance, COL. Before this change the 1D histogram appeared as blank as explained here https://savannah.cern.ch/bugs/index.php?95348.
Revision
44301 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu May 24 13:48:22 2012 UTC (2 years, 8 months ago) by
couet
File length: 338910 byte(s)
Diff to
previous 43774
Apply the patch suggested here:
https://savannah.cern.ch/bugs/?94807
With option COL TProfile2D histograms are handled differently because, for this type of 2D
histograms, it is possible to know if an empty bin has been filled or not. So even
if all the bins' contents are positive some empty bins might be painted. And vice versa,
if some bins have a negative content some empty bins might be not painted.
Revision
43774 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Apr 17 11:40:18 2012 UTC (2 years, 9 months ago) by
couet
File length: 337880 byte(s)
Diff to
previous 43573
With option TEXT, do not draw the bins with 0 content for 1D
histograms to be consistent with the 2D histograms case.
Exemple:
root [0] TH1D * histo = new TH1D ("histo","",20,-5.,5.) ;
root [1] histo->FillRandom("gaus",1000) ;
root [2] histo->Draw("hist,text") ;
Revision
43186 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Feb 29 17:46:04 2012 UTC (2 years, 10 months ago) by
couet
File length: 337296 byte(s)
Diff to
previous 42958
- Fix the bug submitted here: http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=14257
In PaintTable the palette was deleted but not removed from the list of functions of the histograms. Later on the list of function was scanned (it was not empty). It crashed during the scan when the obsolete palette's null pointer was accessed. Now the palette is removed from the list of functions before being deleted. Similar wrong code was found in some other places (stats painting). The same fix has been applied (it was ok in PaintStats but wrong in PaintStats2 and PaintStats3).
- Remove some trailing blanks
Revision
42958 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Feb 10 14:47:09 2012 UTC (2 years, 11 months ago) by
moneta
File length: 337142 byte(s)
Diff to
previous 42675
- add support for asymmetric Poisson error in the histogram (when the histogram is not weighted)
- Add the methods TH1::GetBinErrorLow(ibin) and TH1::GetBinErrorUp(ibin)
- Add possibility to use different bin errors by using TH1::SetBinErrorOption(type). The type of errors which one can set are:
- TH1::kNormal</tt>: this are the default errors (symmetric) based on the normal approximation. Bin error = sqrt(N).
In case of a weighted histogram (non-integer bin content), the normal approximation is always used
- TH1::kPoisson: in this case the lower and upper error are defined by the 68% classical (frequentist) Poisson interval for N counts
(Garwood Poisson interval).
- TH1::kPoisson2: as above but in this case a 95% (2-sigma) Poisson interval is used.
- Add support in histpainter for drawing 1D and 2D asymmetric errors
Revision
42562 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Dec 21 15:11:00 2011 UTC (3 years, 1 month ago) by
couet
File length: 336409 byte(s)
Diff to
previous 42543
Take into account the absolute value of the histogram's minimum to compute the maximal boxes' size when an histogram is drawn with the option BOX.
Revision
42543 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Dec 19 16:14:35 2011 UTC (3 years, 1 month ago) by
couet
File length: 336244 byte(s)
Diff to
previous 42470
In PaintBoxes when two histograms where painted on top of each other with the option SAME, the plot was wrong if the minimum of the first histogram was not zero. (Thanks Axel).
Revision
41906 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Nov 11 14:03:15 2011 UTC (3 years, 2 months ago) by
couet
File length: 336183 byte(s)
Diff to
previous 41541
When 1D histograms are painted with the options TEXT and BAR simultaneously, the text for each bin is placed taking into account the bar offset
and bar width attributes. Previously, when several histogram were drawn that way, the texts overlapped.
Revision
41047 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Sep 28 11:13:39 2011 UTC (3 years, 3 months ago) by
couet
File length: 331023 byte(s)
Diff to
previous 40781
Make sure the unique canvas name generated in SetShowProjection starts with a letter, and not with a number, to avoid to generate wrong macro when the canvas is saved as a .C file.
Revision
39592 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jun 8 08:11:01 2011 UTC (3 years, 7 months ago) by
moneta
File length: 330491 byte(s)
Diff to
previous 38687
When drawing scatter plot for TH2 or TH2Poly do not use gRandom, but an independent random generator instance,
to avoid interfering with gRandom
This fixes the bug <a href="https://savannah.cern.ch/bugs/?83021" >83021</a>.
Now the same sequence is also used for the same histograms, giving therefore the same scatter plot for the same
histogram.
Revision
38314 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Mar 7 10:49:00 2011 UTC (3 years, 10 months ago) by
couet
File length: 330091 byte(s)
Diff to
previous 38229
- In PaintFunction TF2 are drawn as surfaces if the
histogram plotting option is LEGO or SURF and as contours
if the histogram plotting option is not a 3D one.
Revision
37884 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jan 26 12:01:12 2011 UTC (3 years, 11 months ago) by
couet
File length: 329619 byte(s)
Diff to
previous 37814
- Protection added in PaintBoxes. I case two histograms
were plotted in the same pad (the 2nd one with option SAME),
The clipping was not correct when an interactive zoom
was performed.
Revision
35759 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Sep 27 07:33:38 2010 UTC (4 years, 3 months ago) by
couet
File length: 315595 byte(s)
Diff to
previous 35568
- Log axis with TH3 did not work. Bug visible with:
TH3F h3("h3","h3",10,1,1000,10,1,1000,10,1,1000)
h3.Draw()
gPad->SetLogx(1);
Revision
35060 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Aug 29 08:39:10 2010 UTC (4 years, 4 months ago) by
brun
File length: 314635 byte(s)
Diff to
previous 35046
From Mattias Ellert
In the file hist/histpainter/src/THistPainter.cxx there is a typo in the documentation mark-up.
The same typo is repeated 11 times!!!
It says gStyle->SePalette() instead of gStyle->SetPalette()
Revision
34128 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jun 25 09:15:01 2010 UTC (4 years, 7 months ago) by
couet
File length: 314036 byte(s)
Diff to
previous 34115
- Fix a precision issue in PaintInit. Problem way seen with:
TF1 *f = new TF1("f","100*exp(-x)*exp(x-2.)",0.,2.0);
f->Draw();
Revision
34115 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jun 24 16:03:53 2010 UTC (4 years, 7 months ago) by
couet
File length: 313840 byte(s)
Diff to
previous 33768
- New parameter bf() in the SPEC option to define the buffer size
used by TSpectrum2Painter. It is needed in case of very
large canvases like 8000x5000.
Revision
33265 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Apr 28 09:59:45 2010 UTC (4 years, 8 months ago) by
couet
File length: 312053 byte(s)
Diff to
previous 33262
- The following lines generated an empty stats box:
gStyle->SetStatFont(43);
gStyle->SetStatFontSize(12);
TH2D *h2 = new TH2D("h2","h2",10,0,1,10,0,1);
h2->Draw();
Revision
33262 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Apr 28 09:24:13 2010 UTC (4 years, 8 months ago) by
couet
File length: 311957 byte(s)
Diff to
previous 32930
- In the case of profile histograms it is possible to print the number
of entries instead of the bin content. It is enough to combine the
option "E" (for entries) with the option "TEXT".
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: 310587 byte(s)
Diff to
previous 32920
Prefer the use of InheritsFrom(TClass*) over InheritsFrom(const char*) as long as
it does not increase the library dependencies.
Revision
32510 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Mar 9 15:55:58 2010 UTC (4 years, 10 months ago) by
couet
File length: 309166 byte(s)
Diff to
previous 32425
- In the option COL POL change the x and y axis mapping
on the radius and angle is now the same as SURF1,POL and
TGraphPolar
Revision
32330 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Feb 11 14:24:46 2010 UTC (4 years, 11 months ago) by
couet
File length: 309091 byte(s)
Diff to
previous 32200
- The following macro displayed the hitograms outside of the frame.
{
TCanvas *c = new TCanvas("c","c");
c->Divide(2,1);
gStyle->SetHistMinimumZero();
TH1F* h = new TH1F("h","h", 44, -0.5, 43.5);
h->SetBarWidth(0.7);
h->SetBarOffset(0.2);
h->SetFillColor(kGreen);
for (int i=0;i<44; i++ ) h->Fill(i, -i-60);
c->cd(1); h->DrawCopy("bar1");
c->cd(2); h->DrawCopy("b");
}
Revision
32200 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Feb 3 16:54:27 2010 UTC (4 years, 11 months ago) by
couet
File length: 309052 byte(s)
Diff to
previous 31966
- The following macro didn't draw any box. Because of a precision
problem the filled bin was not drawn.
{
double yarr[] = { 1.0, 2.0, 3.0, 4.0 };
double xarr[] = { 0.01, 0.02, 0.03, 0.04 };
TH2D *h = new TH2D("h","h",3,xarr,3,yarr);
h->Fill(0.011,2.5);
h->Draw("box");
}
Revision
31966 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jan 6 14:05:02 2010 UTC (5 years ago) by
couet
File length: 309036 byte(s)
Diff to
previous 31658
- Fix the problem mentionned here:
https://savannah.cern.ch/bugs/index.php?61112
After executing the following macro, zooming the X axis interactively
generated the error message:
Error in <TGraphPainter::PaintGraphHist>: X must have N+1 values with option N
{
int n = 70;
TH1F h("h","test",n,0.,30.);
TRandom3 rndm_engine;
for (int i=0; i<10000; ++i) h->Fill(rndm_engine->Gaus(15.,4.));
TF1 f("f","gaus");
h->Fit("f");
gPad->SetLogx();
}
Revision
30749 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Oct 15 16:33:04 2009 UTC (5 years, 3 months ago) by
brun
File length: 306090 byte(s)
Diff to
previous 30643
From Matthew Strait:
This patch fixes the spelling of "function" in the root source code
and documentation, which is misspelled (sometimes as part of larger
"function"-based words) at least 152 times:
* "funciton" 48 times
* "funcion" 36 times
* "funtion" 23 times
* "fucntion" 17 times
* "functionn" 6 times
* "fuction" 6 times
* "fuunction" 4 times
* "functioin" 3 times
* "fonction" 3 times
* "funstion" twice
* "fnuction" once
* "functiom" once
* "functio" once
* "funcition" once
Revision
30643 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Oct 9 09:57:40 2009 UTC (5 years, 3 months ago) by
moneta
File length: 306089 byte(s)
Diff to
previous 29775
- Round the number of entries displayed in the statistics box to the closest integer value. This fixes a problem observed when
displaying the effective entries of a weighted histogram.
- update release notes
Revision
29775 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Aug 13 15:07:28 2009 UTC (5 years, 5 months ago) by
moneta
File length: 306073 byte(s)
Diff to
previous 29308
- implement new method IntegralAndError (for TH1, TH2 and TH3) calculating both the integral and the error from the bin content and error od the histogram.
Refactor also the Integral method to use the same common code for all the histogram types
Implement also a new version of TF1::Integral error working for multi-dimensional functions
Remove the drawing in the statistical box for TH3 of the underflow/overflow table, untila an appropriate solution is found. Before a 2D-like table was drawn with all zero.
Revision
28127 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Apr 7 13:12:48 2009 UTC (5 years, 9 months ago) by
couet
File length: 300959 byte(s)
Diff to
previous 27399
- More improvements in GetBestFormat. There was still cases
where the error was not displayed with E notation whereas
the value was. A new test will be introduced in
stressGraphics to cover all the cases handled by
GetBestFormat.
Revision
27399 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Feb 10 15:01:33 2009 UTC (5 years, 11 months ago) by
couet
File length: 300834 byte(s)
Diff to
previous 26338
- In case the errors of the fit parameters had large values (>E+07)
the fit result in the stat box looed not very nice.
The Method GetBestFormat have been changed. The problem was
visible with the following macro:
{
gStyle->SetOptFit(1111);
h = new TH1F("h","h", 2,0.,1.);
h->SetBinContent(1, 5E8);
h->SetBinError(1, 4.9E8);
h->Fit("pol0");
}
Revision
25750 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Oct 9 09:12:25 2008 UTC (6 years, 3 months ago) by
couet
File length: 300797 byte(s)
Diff to
previous 25489
- Make sure the frame is transparent when the a surface is drawn using the
option SAME.
- Complete the help for the GL options.
Revision
25489 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Sep 22 13:05:29 2008 UTC (6 years, 4 months ago) by
brun
File length: 300507 byte(s)
Diff to
previous 24700
From Lorenzo:
-move TVirtualFitter from core to mathcore.
-remove FitPanel method from THistPainter
-new plugins for Fumili and FitPanel. Use now plug-in manager to create FitPanel.
Revision
24484 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jun 23 15:36:54 2008 UTC (6 years, 7 months ago) by
couet
File length: 299101 byte(s)
Diff to
previous 24364
- In revision 20804, a test has been added to:
"Make option BAR work with option HIST"
This test worked nicely when Hoption.Bar >= 10 (option "BAR" and "HBAR").
But, in some cases, it disabled th case Hoption.Bar = 1 (simple option "B").
Revision
24364 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jun 19 09:17:21 2008 UTC (6 years, 7 months ago) by
couet
File length: 299099 byte(s)
Diff to
previous 24297
- Better formatting of the HTML code to make it more readable
and easier to modify. In particular the tables describing
the options.
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
File length: 283656 byte(s)
Diff to
previous 23662
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
23594 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Apr 28 13:51:21 2008 UTC (6 years, 8 months ago) by
couet
File length: 283607 byte(s)
Diff to
previous 22694
- In PaintH3 the palette is drawn in case of option COLZ. This is useful
when a TTree 4D plot is painted with that option.
Revision
17252 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jan 3 14:24:58 2007 UTC (8 years ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 274261 byte(s)
Diff to
previous 17180
From Sergey Skononov:
This bug is connected with fixing bug #22317 which I submitted previously.
Unfortunately, I got it only after release 5.14 was published.
Due to the fix in THistPainter::PaintBarH the PaintAxis call was moved to the
very end of the routine. But, actually, it should come before the X and Y axis
pointers being permuted back. As I checked, now it looks like X axis
attributes have effect on the Y axis and vice versa.
Revision
16942 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Nov 25 09:02:22 2006 UTC (8 years, 2 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 276378 byte(s)
Diff to
previous 16924
Add new static function:
void THistPainter::PaintSpecialObjects(const TObject *obj, Option_t *option)
// Static function to paint special objects like vectors and matrices
// This function is called via gROOT->ProcessLine to paint these objects
// without having a direct dependency of the graphics or histogramming system
Revision
16074 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Aug 22 12:23:27 2006 UTC (8 years, 5 months ago) by
couet
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 273415 byte(s)
Diff to
previous 15824
- Small fix to make sure the option "cont0" is always drawn with filled
contours (as said in the help). Without this fix the following lines
produced hollow contours:
root [0] gROOT->ForceStyle()
root [1] gStyle->SetFillStyle(1001)
root [2] gStyle->SetHistFillStyle(0)
root [3] hpxpy->Draw("cont0")
Revision
14978 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue May 9 16:53:44 2006 UTC (8 years, 8 months ago) by
couet
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 260146 byte(s)
Diff to
previous 14944
- PaintColorLevels: The modifications made in Revision 1.198 to
"take into account the option set by TStyle::SetHistMinimumZero"
is not appropriate for PaintColorLevels. It screws up completly the
correspondance between the color plot and the palette. The bad matching
was even worst with histogram having negative contents. Like in the
following example:
{
TH2F* histo = new TH2F( "histo", "histo", 3, 0.0, 3.0, 2, 0.0, 2.0 );
Int_t dummy;
dummy = histo->GetBin( 1, 1 );
histo->SetBinContent( dummy, -100.0 );
dummy = histo->GetBin( 2, 1 );
histo->SetBinContent( dummy, -90.0 );
dummy = histo->GetBin( 3, 1 );
histo->SetBinContent( dummy, 12.0 );
dummy = histo->GetBin( 1, 2 );
histo->SetBinContent( dummy, 45.0 );
dummy = histo->GetBin( 2, 2 );
histo->SetBinContent( dummy, 75.0 );
dummy = histo->GetBin( 3, 2 );
histo->SetBinContent( dummy, 100.0 );
gStyle->SetPalette( 1, 0 );
histo->Draw("colz");
histo->Draw("textsame");
}
Revision
14609 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Apr 10 06:55:14 2006 UTC (8 years, 9 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 225253 byte(s)
Diff to
previous 14444
-In TVirtualHistPainter.h replace the previous functions:
virtual void SetShowProjectionX() = 0;
virtual void SetShowProjectionY() = 0;
by one single function working for TH2 and TH3
virtual void SetShowProjection(const char *option) = 0;
-In THistPainter add the following functions:
virtual void SetShowProjection(const char *option);
virtual void ShowProjectionX(Int_t px, Int_t py);
virtual void ShowProjectionY(Int_t px, Int_t py);
virtual void ShowProjection3(Int_t px, Int_t py);
-In THistPainter.cxx implement the new function
void THistPainter::ShowProjection3(Int_t px, Int_t py)
// Show projection (specified by fShowProjection) of a TH3
// The drawing option for the projection is in fShowOption.
-In TH3, add the new function:
void TH3::SetShowProjection(const char *option)
// When the mouse is moved in a pad containing a 3-d view of this histogram
// a second canvas shows a projection type given as option.
// To stop the generation of the projections, delete the canvas
// containing the projection.
// option may contain a combination of the characters x,y,z,e
// option = "x" return the x projection into a TH1D histogram
// option = "y" return the y projection into a TH1D histogram
// option = "z" return the z projection into a TH1D histogram
// option = "xy" return the x versus y projection into a TH2D histogram
// option = "yx" return the y versus x projection into a TH2D histogram
// option = "xz" return the x versus z projection into a TH2D histogram
// option = "zx" return the z versus x projection into a TH2D histogram
// option = "yz" return the y versus z projection into a TH2D histogram
// option = "zy" return the z versus y projection into a TH2D histogram
// option can also include the drawing option for the projection, eg to draw
// the xy projection using the draw option "box" do
// myhist.SetShowProjection("xy box");
// This function is typically called from the context menu.
Note that this function is only partially implemented. It works only for the option "xy".
It is included in CVS as a framework for additional developments. see
http://root.cern.ch/phpBB2/viewtopic.php?t=3289
Revision
14357 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Mar 21 15:40:56 2006 UTC (8 years, 10 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 221606 byte(s)
Diff to
previous 14238
Add two new functions in TH2:
These new functions can be selected via the TH2 context menu.
They are a full implementation of the tutorial DynamicSlices.C
void TH2::SetShowProjectionX()
// When the mouse is moved in a pad containing a 2-d view of this histogram
// a second canvas shows the projection along X corresponding to the
// mouse position along Y.
// To stop the generation of the projections, delete the canvas
// containing the projection.
void TH2::SetShowProjectionY()
// When the mouse is moved in a pad containing a 2-d view of this histogram
// a second canvas shows the projection along Y corresponding to the
// mouse position along X.
// To stop the generation of the projections, delete the canvas
// containing the projection.
Revision
13802 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jan 9 10:35:12 2006 UTC (9 years ago) by
couet
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 215131 byte(s)
Diff to
previous 13733
- The statistics parameters names can now be changed thanks to settings
in the file $ROOTSYS/etc/system.rootrc. The default values are the
following:
Hist.Stats.Entries Entries
Hist.Stats.Mean Mean
Hist.Stats.MeanX Mean x
Hist.Stats.MeanY Mean y
Hist.Stats.RMS RMS
Hist.Stats.RMSX RMS x
Hist.Stats.RMSY RMS y
Hist.Stats.Underflow Underflow
Hist.Stats.Overflow Overflow
Hist.Stats.Integral Integral
Hist.Stats.Skewness Skewness
Hist.Stats.SkewnessX Skewness x
Hist.Stats.SkewnessY Skewness y
Hist.Stats.Kurtosis Kurtosis
Hist.Stats.KurtosisX Kurtosis x
Hist.Stats.KurtosisY Kurtosis y
Revision
13531 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Dec 7 17:19:49 2005 UTC (9 years, 1 month ago) by
couet
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 212839 byte(s)
Diff to
previous 13503
- Since the axis for the CONT4 option are drawn using PaintAxis, it is
now possible to use gPad->RedrawAxis() on a 'cont4 plot' (It was not
possible before). This new possibility is now taken into account in
PaintAxis. The following macro illustrate the problem:
{
TH2F *h = new TH2F("h","test",40,-2,2,40,-2,2);
TRandom r;
for (Int_t i=0;i<10000;i++) {
h->Fill(r.Gaus(0,1),r.Gaus(0,0.6));
}
h->Draw("cont4");
c1->RedrawAxis();
}
Revision
13485 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Dec 4 10:51:27 2005 UTC (9 years, 1 month ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 212212 byte(s)
Diff to
previous 13395
Replace all references to Axis_t and Stat_t by Double_t in all histogram classes.
Following several recent requests, implement new functions
to search the bin with a specified content.
Double_t TH1::GetBinWithContent(Double_t c, Int_t &binx, Int_t firstx, Int_t lastx,Double_t maxdiff) const
{
// compute first binx in the range [firstx,lastx] for which
// diff = abs(bin_content-c) <= maxdiff
// In case several bins in the specified range with diff=0 are found
// the first bin found is returned in binx.
// In case several bins in the specified range satisfy diff <=maxdiff
// the bin with the smallest difference is returned in binx.
// In all cases the function returns the smallest difference.
//
// NOTE1: if firstx <= 0, firstx is set to bin 1
// if (lastx < firstx then firstx is set to the number of bins
// ie if firstx=0 and lastx=0 (default) the search is on all bins.
// NOTE2: if maxdiff=0 (default), the first bin with content=c is returned.
Double_t TH2::GetBinWithContent2(Double_t c, Int_t &binx, Int_t &biny, Int_t firstx, Int_t lastx, Int_t firsty, Int_t lasty, Double_t maxdiff) const
{
// compute first cell (binx,biny) in the range [firstx,lastx](firsty,lasty] for which
// diff = abs(cell_content-c) <= maxdiff
// In case several cells in the specified range with diff=0 are found
// the first cell found is returned in binx,biny.
// In case several cells in the specified range satisfy diff <=maxdiff
// the cell with the smallest difference is returned in binx,biny.
// In all cases the function returns the smallest difference.
//
// NOTE1: if firstx <= 0, firstx is set to bin 1
// if (lastx < firstx then firstx is set to the number of bins in X
// ie if firstx=0 and lastx=0 (default) the search is on all bins in X.
// if firsty <= 0, firsty is set to bin 1
// if (lasty < firsty then firsty is set to the number of bins in Y
// ie if firsty=0 and lasty=0 (default) the search is on all bins in Y.
// NOTE2: if maxdiff=0 (default), the first cell with content=c is returned.
Double_t TH3::GetBinWithContent3(Double_t c, Int_t &binx, Int_t &biny, Int_t &binz, Int_t firstx, Int_t lastx, Int_t firsty, Int_t lasty, Int_t firstz, Int_t lastz, Double_t maxdiff) const
{
// compute first cell (binx,biny,binz) in the range [firstx,lastx](firsty,lasty][firstz,lastz] for which
// diff = abs(cell_content-c) <= maxdiff
// In case several cells in the specified range with diff=0 are found
// the first cell found is returned in binx,biny,binz.
// In case several cells in the specified range satisfy diff <=maxdiff
// the cell with the smallest difference is returned in binx,biny,binz.
// In all cases the function returns the smallest difference.
//
// NOTE1: if firstx <= 0, firstx is set to bin 1
// if (lastx < firstx then firstx is set to the number of bins in X
// ie if firstx=0 and lastx=0 (default) the search is on all bins in X.
// if firsty <= 0, firsty is set to bin 1
// if (lasty < firsty then firsty is set to the number of bins in Y
// ie if firsty=0 and lasty=0 (default) the search is on all bins in Y.
// if firstz <= 0, firstz is set to bin 1
// if (lastz < firstz then firstz is set to the number of bins in Z
// ie if firstz=0 and lastz=0 (default) the search is on all bins in Z.
// NOTE2: if maxdiff=0 (default), the first cell with content=c is returned.
Revision
13392 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Nov 29 12:52:03 2005 UTC (9 years, 1 month ago) by
couet
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 212195 byte(s)
Diff to
previous 13320
- In case of 1D histograms plotted as a LEGO or a SURFACE, one had to change
the option LogZ to set the logarithmic scale on the Y axis. Setting the
option LogY produced an error. This is now fixed.
- More changes to be compliant with the coding conventions (comments format).
Revision
13320 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Nov 23 08:50:42 2005 UTC (9 years, 2 months ago) by
couet
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 213407 byte(s)
Diff to
previous 13249
- PaintErrors:
In case of log scale on a Y axis with a positive maximum value and a minimum
value less or equal to 0, a new minimum is computed as a percentage of the
maximum. This rule is fine but may brings back visible some bins which are
out of range in linear mode. A new test has been added to prevent that. This
problem is visible since revision 1.197. Previously the test modified in that
revision was able to filter such wrong cases.
Revision
13249 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Nov 16 11:02:16 2005 UTC (9 years, 2 months ago) by
couet
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 213352 byte(s)
Diff to
previous 13242
- PaintAxis:
The "long standing problem" mentioned in revisions 1.24 and 1.223 has been
identified. When an histogram is drawn with error-bars the values stored in
Hparam and those returned by gPad->GetUymin/max are different (because the
error-bars need more room to be drawn). The correct values are those returned
by gPad->GetUymin/max except in case of CONT4 (contours drawn with
TPainter3dAlgorithm) where Hparam must be used. The "long standing problem"
was visible with the following lines:
TH1D *h1 =new TH1D("h1","h1",100,-10,10);
h1->FillRandom("gaus");
h1->Draw("e");
gPad->RedrawAxis();
In that case the axis drawn by RedrawAxis are shifted compare to the original
ones.
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/histpainter/src/THistPainter.cxx
File length: 212692 byte(s)
Diff to
previous 13215
- 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
13178 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Nov 9 17:24:52 2005 UTC (9 years, 2 months ago) by
couet
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 212690 byte(s)
Diff to
previous 12994
- Option "A" (to suppress the axis drawing on histogram plots) is now working
on 2D plots also. Hoption.Axis can have the following value:
Hoption.Axis = 0 ; User option = " " ; both axis and histogram are drawn.
Hoption.Axis = -1 ; User option = "A" ; axis are not drawn.
Hoption.Axis = 1 ; User option = "AXIS" ; only axis are drawn (not the grid).
Hoption.Axis = 2 ; User option = "AXIG" ; only the grid is drawn.
- Some clean up to make the rule checker happy.
Revision
12994 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Oct 20 21:07:52 2005 UTC (9 years, 3 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 213031 byte(s)
Diff to
previous 12954
Protect THistPainter::PaintBoxes against a division by 0
in case of code like
hh = new TH2F("hh","hh",100,0,1,100,0,1);
hh->Fill(200,200); // out of range value, so that
GetSumOfWeights()==0
hh->Draw("box");
(thanks Ruben Shahoyan for reporting the problem)
Revision
12954 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Oct 13 16:37:20 2005 UTC (9 years, 3 months ago) by
couet
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 212997 byte(s)
Diff to
previous 12945
- Since the axis are painted with PaintAxis() for the contour option CONT4
(in PaintContour), there is no need to have the funny values 0.0001 and
89.99 for the Phi and Theta angles (set with SetPhi() and SetTheta()). They
can be replaced by the exact value 0. and 90. This weird angles values were
needed when the axis were painted with TPaint3DAlgorithms. The exact values
produced wrong tick marks and labels placements.
Revision
12945 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Oct 13 08:10:27 2005 UTC (9 years, 3 months ago) by
couet
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 213002 byte(s)
Diff to
previous 12622
- The contour option CONT4, is done by painting a colored surface seen
from top. With this technique the axis are painted by TPainter3dAlgorithms
as for normal lego or surface's axis. Therefore they did not behave like
the normal "2D axis" in particular:
* Tick marks were on the wrong axis' side.
* It was not possible to draw axis' grid.
* SetTickx() and SetTicky() had no effect.
This patch fixes this problems. The axis for CONT4 are now drawn with
THistPainter::PaintAxis(), not anymore using TPainter3dAlgorithms. To
achieve that, it was necessary to modify PaintAxis(): the axis label
(variables "umin" and "umax") are now computed from Hparam. This
modification is a partial "roll back" compare to revision 1.24. This
revision said:
"Correct THistPainter::PaintAxis to use axmin,axmax,aymin,aymax instead
of HParam.xmin, etc. This fixes a long standing problem when the
function TPad::RedrawAxis is called."
This comment is a bit useless because it doesn't tell what the "long
standing problem" was. Anyway, none of the known examples using
RedrawAxis didn't show a wrong behavior with the modified PaintAxis.
This is not surprising because "umin" and "umax" are the axis labels and
they do not act on the axis position.
Revision
11767 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed May 11 11:31:32 2005 UTC (9 years, 8 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 207030 byte(s)
Diff to
previous 11667
From Olivier:
- The type of information printed in the histogram statistics box can be
selected via gStyle->SetOptStat(mode).
The parameter mode can be = iourmen (default = 0001111)
[...]
m = 1; mean value printed
m = 2; mean and mean error values printed
r = 1; rms printed
r = 2; rms and rms error printed
[...]
"m" and "r" can now be equal to 2, which mean "print the errors".
Revision
11271 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Mar 9 17:28:09 2005 UTC (9 years, 10 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 205795 byte(s)
Diff to
previous 11176
From Olivier:
- In THistPainter::PaintColorLevels the colored boxes might be drawn
outside gPad if their upper limits were smaller than the gPad lower
limits or if their lower limits were bigger than the gPad higher limits.
The following example shows the problem:
void colzsame ()
{
TCanvas * c0 = new TCanvas("c0","c0",600,600);
TH2D * base = new TH2D("base","base",10,-1,1,10,0.,1.5);
base->Draw();
TH2D * h2d = new TH2D("h2d","h2d",10,0.,1.,10,0.,1.);
gStyle->SetPalette(1);
for (int i=0; i<10; i++) {
for (int j=0; j<10; j++) {
h2d->SetBinContent(i+1,j+1,(i+1)*10.+j+1);
}
}
h2d->Draw("samecolz");
base->SetAxisRange(0.5,0.7,"X");
base->SetAxisRange(0.5,0.7,"Y");
}
Revision
11176 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Feb 24 11:29:37 2005 UTC (9 years, 11 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 205605 byte(s)
Diff to
previous 11064
From Olivier:
- In case of gStyle->SetOptStat(0), statistic boxes containing fits
parameters were not correctly drawn. The following macro showed the
problem:
gStyle->SetOptFit(1); gStyle->SetOptStat(0);
TH1D* h=new TH1D("asdf","asdf",100,0,100);
h->Fill(50,430); h->Fit("gaus");
Revision
11063 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Feb 8 16:33:38 2005 UTC (9 years, 11 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 205591 byte(s)
Diff to
previous 10863
From Olivier:
- Option BOX Improvements: a box is drawn for each cell with surface
proportional to the content's absolute value. A negative content is
marked with a X.
- New option BOX1: a button is drawn for each cell with surface
proportional to content's absolute value. A sunken button is drawn for
negative values a raised one for positive.
Revision
10863 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jan 4 10:25:26 2005 UTC (10 years ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 202142 byte(s)
Diff to
previous 10690
From Olivier:
- New function TStyle::SetTitleAlign() (and corresponding Get) to define
the histogram title alignment with the same convention as the text
alignment (a 2 digits integer): hv
where "h" is the horizontal alignment and "v" is the vertical alignment.
"h" can get the values 1 2 3 for left, center, and right
"v" can get the values 1 2 3 for bottom, middle and top
for instance the default alignment is: 13 (left top)
Example:
gStyle->SetTitleAlign(31)
hpx->Draw()
Revision
10416 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Oct 27 17:46:56 2004 UTC (10 years, 2 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 199817 byte(s)
Diff to
previous 10253
From Olivier:
- In PaintContour, the first contour was missing when the data set was
painted with option CONT. This problem was introduced by the fix done by
Rene in revision 1.148. BUT, without that fix (1.148), the macro
FirstContour.C doesn't work. This new patch fixes both problems
(missing contour and FirstContour.C not working).
Revision
10207 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Oct 5 10:28:24 2004 UTC (10 years, 3 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 199752 byte(s)
Diff to
previous 10192
An algorithm sent by Ernst-Jan Buis for plotting contours using
the special projections for viewing skymaps or exposure maps has been
introduced in THistPainter and associated classes.
In Hoption.h a new member HOption.Proj has been introduced
int Proj; // = 1 to get an Aitoff projection, usefull for skymaps or exposure maps..
// = 2 to get a Mercator ptojection
// = 3 to get a Sinusoidal ptojection
// = 4 to get a Parabolic ptojection
in THistpainter::Paint, the following options are supported:
// "AITOFF" : Draw a contour via an AITOFF projection
// "MERCATOR" : Draw a contour via an Mercator projection
// "SINUSOIDAL" : Draw a contour via an Sinusoidal projection
// "PARABOLIC" : Draw a contour via an Parabolic projection
The function THistPainter::RecalculateRange has been modified to take into account these new options
as well as the class TPainter3dAlgorithms.
The picture produced by the new tutorial earth.C is visible at
http://root.cern.ch/root/htmldoc/THistPainter.html#THistPainter:PaintContour
Revision
9999 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Sep 13 10:03:09 2004 UTC (10 years, 4 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 191149 byte(s)
Diff to
previous 9885
Upgrade the histogram buffer algorithm such that it can be used in a
coming version of the rebinner of the TH1,2 editors.
When the histogram buffer is active (TH1::SetBuffer has been called),
the buffer is kept alive as long as the number of entries can
be accomodated by the buffer.
When calling the Draw/Paint functions, the histogram is reset and
refilled from the buffer.
The buffer is also preserved by the I/O operations.
The calling sequence of TH1::BufferEmpty has been modified to support
3 cases instead of 2.
Int_t TH1::BufferEmpty(Int_t action)
// action = -1 histogram is reset and refilled from the buffer (called by THistPainter::Paint)
// action = 0 histogram is filled from the buffer
// action = 1 histogram is filled and buffer is deleted
// The buffer is automatically deleted when the number of entries
// in the buffer is greater than the number of entries in the histogram
Revision
9885 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Sep 3 10:51:36 2004 UTC (10 years, 4 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 191147 byte(s)
Diff to
previous 9879
From Olivier:
- TH2::ProjectionX, TH2::ProjectionY, TH2::ProfileX and TH2::ProfileY can
now be performed according to graphical cuts.
Using a TCutG object, it is possible to select a sub-range of a 2-D histogram.
One must create a graphical cut (mouse or C++) and specify the name
of the cut between [] in the option.
For example, with a TCutG named "cutg", one can call:
myhist->ProjectionX(" ",firstybin,lastybin,"[cutg]");
To invert the cut, it is enough to put a "-" in front of its name:
myhist->ProjectionX(" ",firstybin,lastybin,"[-cutg]");
It is possible to apply several cuts:
myhist->ProjectionX(" ",firstybin,lastybin,[cutg1,cutg2]");
Example:
{
TCanvas *c = new TCanvas("c","example",0,0,700,600);
c->Divide(1,2);
TCutG *gcut = new TCutG("gcut",8);
gcut->SetPoint(0,-0.646552,0.932203);
gcut->SetPoint(1,-1.26437,0.105932);
gcut->SetPoint(2,-0.574713,-1.10169);
gcut->SetPoint(3,0.948276,-0.338983);
gcut->SetPoint(4,1.07759,0.720339);
gcut->SetPoint(5,-0.316092,-0.0847458);
gcut->SetPoint(6,-0.45977,0.402542);
gcut->SetPoint(7,-0.646552,0.932203);
TFile f("hsimple.root")
TH2F *hpxpy = (TH2F*)f.Get("hpxpy");
TH1D *hppx = hpxpy->ProjectionX("",1,40,"[gcut]");
c->cd(1);
hpxpy->SetFillColor(kBlue);
hpxpy->DrawCopy("box");
hpxpy->SetFillColor(kRed);
hpxpy->Draw("same box [gcut]");
c->cd(2);
hppx->Draw();
}
Revision
9793 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 20 08:13:45 2004 UTC (10 years, 5 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 190746 byte(s)
Diff to
previous 9783
In THistPainter::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.
In case of a histogram with a negative minimum, do not select
the histogram when crossing the 0 line.
Revision
9440 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jul 8 12:18:50 2004 UTC (10 years, 6 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 190491 byte(s)
Diff to
previous 9334
In TStyle::SetOptFit implement a variant of an existing option
// The type of information about fit parameters printed in the histogram
// statistics box can be selected via gStyle->SetOptFit(mode).
// The parameter mode can be = pcev (default = 0111)
// v = 1; print name/values of parameters
// e = 1; print errors (if e=1, v must be 1)
// c = 1; print Chisquare/Number of degrees of freedom
// p = 1; print Probability
// When "v"=1 is specified, only the non-fixed parameters are shown.
// When "v"=2 all parameters are shown.
In THistPainter::PaintStat, take into account this option.
By default fixed parameters are not shown.
Revision
9305 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jun 24 16:57:13 2004 UTC (10 years, 7 months ago) by
rdm
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 190028 byte(s)
Diff to
previous 9126
From Matt LeBourgeois:
fixes the problem with the drawing of empty bins. The fix was easy because
if there is a log scale then there can't be any negative values for z
therefore the logic statement was changed to if z==0 and
(zmin>0 or Hoption.logz) then continue.
Revision
8914 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu May 13 10:09:10 2004 UTC (10 years, 8 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 189784 byte(s)
Diff to
previous 8897
From Olivier:
- When a TH2 is painted with the option "BOX SAME" the minimum and maximum
values along the Z axis are taken from the first TH2 in the Pad.
Example:
void boxsame() {
gROOT->Reset();
c = new TCanvas("c","Example of BOX plots with option SAME",200,10,700,500);
TH2F *h1 = new TH2F("h1","h1",40,-3,3,40,-3,3);
TH2F *h2 = new TH2F("h2","h2",40,-3,3,40,-3,3);
TH2F *h3 = new TH2F("h3","h3",40,-3,3,40,-3,3);
TH2F *h4 = new TH2F("h4","h4",40,-3,3,40,-3,3);
for (Int_t i=0;i<100000;i++) {
double x,y;
gRandom->Rannor(x,y);
if(x>0 && y>0) h1->Fill(x,y,4);
if(x<0 && y<0) h2->Fill(x,y,3);
if(x>0 && y<0) h3->Fill(x,y,-2);
if(x<0 && y>0) h4->Fill(x,y,1);
}
h1->SetLineColor(1);
h2->SetLineColor(2);
h3->SetLineColor(3);
h4->SetLineColor(4);
h1->Draw("box");
h2->Draw("box same");
h3->Draw("box same");
h4->Draw("box same");
}
Revision
8549 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Apr 6 21:36:47 2004 UTC (10 years, 9 months ago) by
rdm
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 187514 byte(s)
Diff to
previous 8508
From Olivier:
In PaintContour, the patch done in the revision 1.167 was not correct. It
produced the following side effect: SetContour() called with a single
integer had no effect. This new version is similar to the logic we have in
other Paint functions using contours.
Revision
8498 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Mar 25 18:09:11 2004 UTC (10 years, 10 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 183045 byte(s)
Diff to
previous 8487
From Olivier:
- Two improvements in PaintColorLevels:
1) Because of rounding errors, it may happened that a cell's color was
outside the palette even for a z value smaller than the maximum.
2) The bins with zero content are not painted only if the minimum of the
histogram isn't negative.
Revision
7998 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jan 23 23:30:31 2004 UTC (11 years ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 180465 byte(s)
Diff to
previous 7677
From Olivier:
TGraph2D is now split into 3 classes:
- TGraph2D (now in hist) to handle the basic graph 2d data
- TGraphDelaunay (in hist) to generate a Delaunay triangulation of a TGraph2D.
- TGraphPainter (in histpainter) to paint a TGraphDelaunay (used via
THistPainter)
- New function GetContourList in TGraph2D
- New option CONT5: draws a TGraph2D as a contour (using Delaunay
triangles).
- New TGraph2D constructor (from a TH2).
The class TSpectrum2 has been removed (still waiting for fixes from Miroslav)
NOTE: it is recommended to make distclean make
or at least
rm hist/src/G* graph/src/G*
Revision
7589 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Nov 13 17:08:24 2003 UTC (11 years, 2 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 179955 byte(s)
Diff to
previous 7509
From Olivier:
TGraph2D:
- New method FindAllTriangles (it finds all the Delaunay's triangles).
- PaintTriangles handles the paint option TRI, W, and P.
- fNpoints is initialized on the ctors declaration line.
- The triangles painting takes care of log options and of the min and
max values.
- PaintTriangles uses the new THistPainter's method PaintAxis3D to paint
the 3D axis.
THistPainter:
- Option "axis" works on 2D histograms.
- New method PaintAxis3D to paint the 3D axis.
Revision
7295 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Sep 18 10:46:55 2003 UTC (11 years, 4 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 177270 byte(s)
Diff to
previous 7282
Fix two problems reported by Andrei Gaponenko:
- must set bit kClipFrame in PaintContour. This is important when superimposing
several histograms with contours in the same pad and then zooming interactively
on the axes.
- When drawing in log scale a histogram with errors and the histogram has
a maximum close to 1 and a minimum of zero, the Y scale has been optimized.
Revision
6696 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jun 6 16:41:53 2003 UTC (11 years, 7 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 175369 byte(s)
Diff to
previous 6689
In THistPainter::PaintStat and PaintStat2 take into account the text size
when computing the original size of the stats box.
If the text size for the stats box is null (returned by gStyle->GetStatTextSize)
the algorithm uses the previous algorithm computing the original size using the number
of lines in the box.
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/histpainter/src/THistPainter.cxx
File length: 173612 byte(s)
Diff to
previous 6271
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
6173 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Feb 24 10:33:06 2003 UTC (11 years, 11 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 175740 byte(s)
Diff to
previous 6169
From Olivier:
New method GetContourLevelPad in TH1. It returns the contour level value
in Pad coordinates ie: if the Pad is in log scale along Z, the log value
of the level is returned. This was needed to draw user defined contours in
PaintContour and PaintColorLevels in THistPainter.
Revision
6169 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Feb 22 16:21:11 2003 UTC (11 years, 11 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 176011 byte(s)
Diff to
previous 6161
In TPad::RedrawAxis, implement a new option "g"
//
// By default, if the pad has the options gridx or/and gridy activated,
// the grid is not drawn by this function.
// if option="g" is specified, this will force the drawing of the grid
// on top of the picture
THistPainter::Paint modified to support the new option from RedrawAxis.
Revision
6156 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Feb 20 22:39:51 2003 UTC (11 years, 11 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 175736 byte(s)
Diff to
previous 6110
Add a new argument drawGridOnly to THistPainter::PaintAxis.
In THistPainter::PaintHist, PaintAxis is called first to paint the grid only
if a grid has been requested in the pad. A second call to PaintAxis
will draw the axis without the grid.
This change is to make sure that the grid is drawn in the background
and the axis tick marks in the foreground of the pad.
Revision
6008 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jan 29 16:49:31 2003 UTC (11 years, 11 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 175391 byte(s)
Diff to
previous 5932
From Olivier:
* New option SURF5:
"SURF5" : Same as SURF3 but only the colored contour is drawn. Used
with option CYL, SPH or PSR it allows to draw colored
contours on a sphere, a cylinder or a in pseudo rapidy space.
In cartesian or polar coordinates, option SURF3 is used.
* With option SURF4 (Gouraud shading) only the cartesian system was
allowed. This restriction (in the funtion analysing the plotting
options) has been removed because Gouraud shading works in all the
coordinate systems (POL, CYL, SPH and PSR).
Revision
5235 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Sep 7 20:55:42 2002 UTC (12 years, 4 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 173475 byte(s)
Diff to
previous 5180
TStyle::SetEndErrorSize moved from declaration to implementation file.
Document this function that can be used to remove the small lines at the end
of the error bars.
Default value for parameter changed from 1 to 2 in such a way that calling
gStyle->setEndErrorSize(0); will remove the end lines
Modify THistPainter::PaintErrors and TGraphErrors::Paint accordingly.
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/histpainter/src/THistPainter.cxx
File length: 173102 byte(s)
Diff to
previous 5075
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
4911 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jul 15 10:56:22 2002 UTC (12 years, 6 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 172038 byte(s)
Diff to
previous 4869
Change THistPainter::PaintStat and PaintStat2 to implement the new logic
with TPaveStats. The "stats" object is now added to the list of functions
instead of being a member of THistPainter. With this change, it is easy
to support multiple stats box in the same pad.
//
// With the option "same", the statistic box is not redrawn.
// With the option "sames", the statistic box is drawn. If it hiddes
// the previous statistics box, you can change its position
// with these lines (if h is the pointer to the histogram):
//
// Root > TPaveStats *st = (TPaveStats*)h->GetListOfFunctions()->FindObject("stats")
// Root > st->SetX1NDC(newx1); //new x start position
// Root > st->SetX2NDC(newx2); //new x end position
It is not necessary anymore to change the name of the stats box if one wants
to add a new stats box. For example, the following works correctly:
hpx.draw();
hprof.Draw("sames"); //move teh position of teh stats box with the mouse
Note that the system is backward compatible is a user calls
TPaveStats *stats = (TPaveStats*)gpad->GetPrimitive("stats")
thanks to the new logic in TPad::GetPrimitive calling FindObject on each
object in the list.
Revision
4869 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jul 10 11:28:20 2002 UTC (12 years, 6 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 172134 byte(s)
Diff to
previous 4868
Patch from Olivier
When drawing errors with option E3 it may happen that the number of points
in the final filled-area is smaller that 2*(the_number_of_error_bars).
In a such case the arrays used to draw the filled area must be arranged
before being plotted. The bug was visible with the following little macro:
void e3(){
TH1F* h_test = new TH1F("h_test","h_test", 45, 0, 12 );
for (Int_t i = 8; i <= 45; ++i) {
h_test->SetBinContent(i, 4.0);
Float_t error = (40.1-i)/40.0;
h_test->SetBinError(i, error);
}
TCanvas* canvas = new TCanvas("canvas", "canvas", 1);
h_test->SetMinimum(2);
h_test->SetFillColor(kRed);
h_test->Draw("E3");
h_test->Draw("E SAME");
}
Revision
4821 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jul 5 12:31:38 2002 UTC (12 years, 6 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 171728 byte(s)
Diff to
previous 4813
From Olivier:
- Bug fixed in PaintPalette. Hparam.zmin and Hparam.zmax were used instead
of the real minimum and maximum of the histogram. This produced wrong
palette painting. The zmin and zmax in Hparam were used to handle Log
option on z axis. This is not necessary because if the maximum of the
histogram is <= 0 nothing is painted, and in the case where maximum is >0
and the minimum <= 0, TH1::GetMinimum returns a positive value equal to
max/1000.
- 2d functions painted with option COL produced empty boxes instead of
filled color boxes. This was a side effect of a change in the function
constructor in which the fill style is now set to "empty".
fH->SetFillStyle(1);
has been added in PaintColorLevels to fix that.
- In DefineColorLevels "theColor" should be computed as:
theColor = Int_t((i+0.99)....
to be compatible with the same value computed in PaintPalette
- A similar problem occurred in PaintContour. "theColor" was computed as:
Int_t((ipoly+1.99)... instead of: Int_t((ipoly+0.99) ...
Revision
4459 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat May 4 16:07:33 2002 UTC (12 years, 8 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 164901 byte(s)
Diff to
previous 4322
When drawing bar charts (option bar or hbar) the bars are drawn from 0 rather
than from the minimum Y value. Bins with positive values to be drawn as bars
extending from the X axis upwards, and bins with negative values to be drawn
as bars extending from the X axis downwards.
Revision
4216 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Mar 21 16:15:43 2002 UTC (12 years, 10 months ago) by
rdm
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 164062 byte(s)
Diff to
previous 4174
This patch improves to things:
- The background grid on lego and surface plots is now aligned on the
axis main tick marks. It works for optimised and none optimised axis
divisions.
- It is now possible to have non optimised axis divisions (number of
divisions less than 0) on all 3D plots (lego and surfaces) axis and on
the colour palette axis.
Olivier
Revision
4157 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sat Mar 9 09:49:11 2002 UTC (12 years, 10 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 164311 byte(s)
Diff to
previous 4156
Add argument Option_t *option to all THistPainter::Paintxxx functions.
The new argument is used in THistPainter::PaintScatterPlot to control
the number of dots. A new drawing option "scat=ff", eg "scat=10" means
draw a scatter plot drawing a number of dots per cell equal to
the cell content times 10. ff is a floating point. One can scale up/down,
eg scat=0.1, scat=3.14, scat=1e-5. Default is "scat=1".
Revision
4156 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 8 18:44:17 2002 UTC (12 years, 10 months ago) by
rdm
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 163552 byte(s)
Diff to
previous 4105
improved TPaveStat layout by Olivier Couet.
- It handles properly the fit parameters.
- The vertical text positioning is better (uses the vertical alignment
"center").
- Chi2 is printed with the Greek characters.
I noticed that the right alignment of TLatex on screen is not always
perfect. On PS file it is perfect.
Revision
4105 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Feb 25 23:10:33 2002 UTC (12 years, 11 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 163528 byte(s)
Diff to
previous 4087
Use the new function TStyle::GetEndErrorSize to set the length of
the lines drawn at the end of the error bars.
// Use gStyle->SetErrorX(dx) to control the size of the error along x.
// set dx = 0 to suppress the error along x.
//
// Use gStyle->SetEndErrorSize(np) to control the size of the lines
// at the end of the error bars (when option 1 is used).
// By default np=1. (np reprersents the number of pixels).
Revision
4084 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Feb 24 18:05:34 2002 UTC (12 years, 11 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 163252 byte(s)
Diff to
previous 3979
Several optimisations in this patch:
- in PaintTitle, use TLatex::GetXsize to evaluate the length of the TPaveText
where to draw the title.
- In PaintContour, PaintLego, PaintPalette, simplify the logic computing the color
levels. The color palette is now coherent with the colors used in the
contour, including in case of user defined contours or a logZ scale.
Revision
3915 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Feb 7 09:10:23 2002 UTC (12 years, 11 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 163105 byte(s)
Diff to
previous 3906
New feature added by Philippe:
I am taking advantage of the fact that we have one painter per histogram
to individualize a little better the stats box.
The HistPainter now handles a pointer to the stats box. In particular this
means that you can rename it and still have it being updated. The stats can
also now be retrieved via hist->GetPainter()->GetStats(); The HistPainter
now keeps contact with the PaveStats box whether its name have changed or not.
Revision
3697 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jan 18 11:38:28 2002 UTC (13 years ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 162157 byte(s)
Diff to
previous 3637
Add new functionality to the histogram package via the new functions
SetBuffer, BufferFill and BufferEmpty.
virtual void SetBuffer(Int_t buffersize, Option_t *option="");
virtual Int_t BufferFill(Axis_t x, Stat_t w); //protected
virtual Int_t BufferEmpty();
Add new members:
Int_t fBufferSize; //fBuffer size
Double_t *fBuffer; //[fBufferSize] entry buffer
When SetBuffer is called, a dynamic buffer is created to hold up to
fBufferSize entries. When the standard Fill functions are called,
the arguments are put in the buffer, if a buffer is specified.
When the number of entries in the buffer is greater than fBufferSize,
the function BufferEmpty is automatically called.
BufferEmpty will fill the histogram with the entries in the buffer.
In case one of the axis has its lower limit greater or equal
to its upper limit, BufferEmpty calls the THLimitsFinder::FindGoodLimits
to compute the axis limits based on the entries in the current buffer.
When an histogram is created with an axis lower limit greater or equal
to its upper limit, the SetBuffer is automatically called with an
argument fBufferSize equal to fgBufferSize (default value=1000).
fgBufferSize may be reset via the static function TH1::SetDefaultBufferSize.
Revision
3602 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jan 7 18:11:00 2002 UTC (13 years ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 162139 byte(s)
Diff to
previous 3559
New functions:
virtual void PaintBar();
virtual void PaintBarH();
virtual Int_t PaintInitH();
// The BAR options
// ===============
// When the option "bar" or "hbar" is specified, a bar chart is drawn.
// ----Vertical BAR chart: Options "bar","bar0","bar1","bar2","bar3","bar4"
// The bar is filled with the histogram fill color
// The left side of the bar is drawn with a light fill color
// The right side of the bar is drawn with a dark fill color
// The percentage of the bar drawn with either the light or dark color
// is 0 per cent for option "bar" or "bar0"
// is 10 per cent for option "bar1"
// is 20 per cent for option "bar2"
// is 30 per cent for option "bar3"
// is 40 per cent for option "bar4"
//
// Use TH1::SetBarWidth to control the bar width (default is the bin width)
// Use TH1::SetBarOffset to control the bar offset (default is 0)
// See example in $ROOTSYS/tutorials/hbars.C
//
// ----Horizontal BAR chart: Options "hbar","hbar0","hbar1","hbar2","hbar3","hbar4"
// An horizontal bar is drawn for each bin.
// The bar is filled with the histogram fill color
// The bottom side of the bar is drawn with a light fill color
// The top side of the bar is drawn with a dark fill color
Revision
3227 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Nov 16 15:01:51 2001 UTC (13 years, 2 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 151357 byte(s)
Diff to
previous 3145
In THistPainter::PaintErrors, change the algorithm computing the length of the
line at the end of the error bars when option "e1p" is used.
The old algorithm computef the length as being proportional to the marker size.
The new algorithm, in addition, takes into account the "errorx" parameter
as given by gStyle->GetErrorx().
Revision
2600 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jul 20 13:49:53 2001 UTC (13 years, 6 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 149582 byte(s)
Diff to
previous 2584
The THistPainter and TLego classes have been extended with
new functions to draw selected regions of a 2-d histogram.
One can create one or more graphical cuts (TCutG objects)
and specify this (these) cuts in option string of the Draw
function. Example, assuming two graphical cuts with name
"cut1" and "cut2", one can do:
h1.Draw("lego");
h2.Draw("[cut1,-cut2],surf,same");
The second Draw will superimpose on top of the first lego plot
a subset of h2 using the "surf" option with:
-all the bins inside cut1
-all the bins outside cut2
Up to 16 cuts may be specified in the cut string delimited by "[..]"
Currently only the following drawing options are sensitive to
the cuts option: col, box, scat, hist, lego, surf and cartesian
coordinates only.
A set of new functions has been added in THistPainter:
virtual Bool_t IsInside(Int_t x, Int_t y);
virtual Bool_t IsInside(Double_t x, Double_t y);
virtual Int_t MakeCuts(char *cutsopt);
The MakeCuts function is called by THistPainter::MakeChopt to fill
the new THistpainter data members: fNcuts, fCutsOpt and fCuts.
The functions IsInside are called by the THistpainter functions
or the TLego functions.
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/histpainter/src/THistPainter.cxx
File length: 144462 byte(s)
Diff to
previous 965
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
453 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Aug 14 16:49:28 2000 UTC (14 years, 5 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 127119 byte(s)
Diff to
previous 427
- Optimize THistPainter::PaintErrors such that the vertical and horizontal
lines go to the marker without a gap.
- New options to draw contours for 2-d histograms.
The contour option "CONT" is now a pure 2-D option. It is not based
on the surface/lego algorithms.
This option computes now a set of points stored in a list of TGraph objects.
The points in the TGraph are sorted, such that one contour can be drawn
with one fill area. In addition, when the option "List" is specified,
the list of generated TGraph objects is stored in a TObjArray with the
name "contours". This TObjArray is accessible via gROOT->GetListOfSpecials().
When the option "CONT" is used, one can superimpose new contours on top
using the options "CONT1", "CONT2" or "CONT3".
The previous algorithm used by the option "CONT" is still available
as option "CONT4".
For example, the following call
h2->Draw("contzlist");
produces:
- a picture with surface colors to delimitate each contour
- the color palette.
- a list of the boundary points for each countour.
The points used to draw the contours are saved in the TGraph format
and are accessible in the following way:
TObjArray *contours =
gROOT->GetListOfSpecials()->FindObject("contours")
Int_t ncontours = contours->GetSize();
TList *list = (TList*)contours->At(i); //where i is a contour number
list contains a list of TGraph objects. For one given contour, more than
one disjoint polyline may be generated. The number of TGraphs per
countour is given by list->GetSize().
Here we show only the case to access the first graph in the list.
TGraph *gr1 = (TGraph*)list->First();
Revision
128 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jun 13 09:52:04 2000 UTC (14 years, 7 months ago) by
brun
Original Path:
trunk/histpainter/src/THistPainter.cxx
File length: 120818 byte(s)
Diff to
previous 86
- Many mods in TLego.cxx. Most internal variables changed from
Float_t to Double_t.
- Many mods in THistPainter.cxx to reflect the numerous changes in TGraph,
TVirtualPad, TView, TLego. Most internal variables changed from
Float_t to Double_t.
-Hparam.h parameters changed from Float_t to Double_t.
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/histpainter/src/THistPainter.cxx
File length: 119131 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.