Log of /trunk/hist/histpainter/src/TPainter3dAlgorithms.cxx
Parent Directory
Revision
40851 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Sep 12 15:02:21 2011 UTC (3 years, 4 months ago) by
couet
File length: 197511 byte(s)
Diff to
previous 38354
Protection against NaN added in FillPolygon. The following macros demonstrates the problem:
{
TCanvas * canvas = new TCanvas("glC","C",800,800);
TH3D *h = new TH3D("h3","h3",150,0,20,150,-5,5,150,-5,5);
ntuple->Draw("px:py+1:pz+4.7>>h3","","iso");
}
Revision
17495 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jan 25 09:45:27 2007 UTC (8 years ago) by
couet
Original Path:
trunk/histpainter/src/TPainter3dAlgorithms.cxx
File length: 222384 byte(s)
Diff to
previous 17104
- In Revision 1.24 the lego plot was changed to draw the 3D boxes from z=0
even for bins with negative contents. It was not possible to get the old
behavior.
This functionnality correspond, in fact, to something already existing
for 1D histograms: gStyle->SetHistMinimumZero();
Now the lego plot behave the same way:
If gStyle->SetHistMinimumZero() is set, the 3D boxes are drawn from 0
even for bins with negative contents. If this option is not set the 3D
boxes are drawn from the histogram minimum, exactly like for 1D
histograms.
Revision
17104 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Dec 8 13:26:17 2006 UTC (8 years, 1 month ago) by
brun
Original Path:
trunk/histpainter/src/TPainter3dAlgorithms.cxx
File length: 222353 byte(s)
Diff to
previous 14132
Replace the following declarations
R__EXTERN TH1 *gCurrentHist; //these 3 globals should be replaced by class members
R__EXTERN Hoption_t Hoption;
R__EXTERN Hparam_t Hparam;
by
extern TH1 *gCurrentHist; //these 3 globals should be replaced by class members
extern Hoption_t Hoption;
extern Hparam_t Hparam;
Revision
14094 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Feb 23 14:15:21 2006 UTC (8 years, 11 months ago) by
couet
Original Path:
trunk/histpainter/src/TPainter3dAlgorithms.cxx
File length: 221591 byte(s)
Diff to
previous 13644
- The modification done in Revision 1.13 to paint the top of a THStack with
the right color was not working properly in certain cases when there was
more than 3 histograms in the stack: specifically if in a given bin only
one of the histograms is non-empty, then the top of that bin was wrongly
colored with the color of the lowest element of the stack.
This patch fixes this problem. This problem could be seen with the
following example:
void test_lego_stack () {
TH2F * h1 = new TH2F("h1","h1",5,0,6,5,-4,4);
TH2F * h2 = new TH2F("h2","h1",5,0,6,5,-4,4);
TH2F * h3 = new TH2F("h3","h1",5,0,6,5,-4,4);
TH2F * h4 = new TH2F("h4","h1",5,0,6,5,-4,4);
TH2F * h5 = new TH2F("h5","h1",5,0,6,5,-4,4);
h1->SetFillColor(1); // grey
h2->SetFillColor(2); // red
h3->SetFillColor(3); // green
h4->SetFillColor(4); // blue
h5->SetFillColor(5); // yellow
h2->Fill(2,0,11);
h3->Fill(3,0,12);
h4->Fill(4,0,13);
h5->Fill(5,0,14);
THStack * hs = new THStack("hs","test of stack");
hs->Add(h1);
hs->Add(h2);
hs->Add(h3);
hs->Add(h4);
hs->Add(h5);
hs->Draw("lego1");
}
Revision
13644 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Dec 12 10:43:39 2005 UTC (9 years, 1 month ago) by
couet
Original Path:
trunk/histpainter/src/TPainter3dAlgorithms.cxx
File length: 221589 byte(s)
Diff to
previous 13439
- The change done in Revision 1.24 makes sense only in linear scale.
the following lines produced an ugly plot:
h=new TH2F("h","h",10,0.,1.,10,0.,1.)
h->Fill(0.5,0.5,2.)
h->Draw("LEGO")
gPad->SetLogz()
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/TPainter3dAlgorithms.cxx
File length: 214120 byte(s)
Diff to
previous 10189
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
9363 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jul 1 16:27:26 2004 UTC (10 years, 6 months ago) by
brun
Original Path:
trunk/histpainter/src/TPainter3dAlgorithms.cxx
File length: 212696 byte(s)
Diff to
previous 8444
From Olivier:
- When a THStack is drawn as a lego plot (option LEGO1), the top of each
bin is now drawn with the color of the highest non empty stack element
(for that particular bin). If all the stack elements are empty for a
given bin, the color of the lowest stack element is used. Previously the
top of the bin was always drawn with the color of the highest stack
element.
The following macro shows the improvement:
void legocol() {
TCanvas *c1 = new TCanvas;
Int_t nbins = 10;
TH2F *h1 = new TH2F("h1","h1",nbins,-4,4,nbins,-4,4);
h1->SetFillColor(kBlue);
TH2F *h2 = new TH2F("h2","h2",nbins,-4,4,nbins,-4,4);
h2->SetFillColor(kRed);
TH2F *h3 = new TH2F("h3","h3",nbins,-4,4,nbins,-4,4);
h3->SetFillColor(kGreen);
THStack *hs = new THStack("hs","3 plots");
hs->Add(h1);
hs->Add(h2);
hs->Add(h3);
TRandom r;
Int_t i;
for (i=0;i<20000;i++) h1->Fill(r.Gaus(),r.Gaus());
for (i=0;i<20000;i++) h2->Fill(r.Gaus(),r.Gaus());
for (i=0;i<20000;i++) h3->Fill(r.Gaus(),r.Gaus());
Int_t bin;
bin = h1->GetBin(5,4);
h3->SetBinContent(bin,0);
h2->SetBinContent(bin,0);
bin = h1->GetBin(5,3);
h3->SetBinContent(bin,0);
bin = h1->GetBin(5,5);
h2->SetBinContent(bin,0);
hs->Draw("lego1");
}
Revision
5054 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Aug 5 09:26:08 2002 UTC (12 years, 5 months ago) by
brun
Original Path:
trunk/histpainter/src/TPainter3dAlgorithms.cxx
File length: 209484 byte(s)
Diff to
previous 4948
From Olivier
fgF3Clipping, fgF3XClip, fgF3YClip, fgF3ZClip, and *fgCurrentF3 are now
static global variables within the class TPainter3dAlgorithms itself.
Before they were declared as static global variables in the file
TPainter3dAlgorithms.c. Their names have also changed, they now start
with "fg".
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.