Skip to content
Snippets Groups Projects
Commit 934f8246 authored by Olivier Couet's avatar Olivier Couet
Browse files
parent ca99bfe9
No related branches found
No related tags found
No related merge requests found
...@@ -110,6 +110,8 @@ Custom streamers need to #include TBuffer.h explicitly (see ...@@ -110,6 +110,8 @@ Custom streamers need to #include TBuffer.h explicitly (see
## 3D Graphics Libraries ## 3D Graphics Libraries
* When painting a `TH3` as 3D boxes, `TMarker3DBox` ignored the max and min values
specified by `SetMaximum()` and `SetMinimum()`.
## Geometry Libraries ## Geometry Libraries
......
...@@ -310,6 +310,9 @@ void TMarker3DBox::PaintH3(TH1 *h, Option_t *option) ...@@ -310,6 +310,9 @@ void TMarker3DBox::PaintH3(TH1 *h, Option_t *option)
} }
} }
if (wmin < h->GetMinimum()) wmin = h->GetMinimum();
if (wmax > h->GetMaximum()) wmax = h->GetMaximum();
//Create or modify 3-d view object //Create or modify 3-d view object
TView *view = gPad->GetView(); TView *view = gPad->GetView();
if (!view) { if (!view) {
...@@ -344,7 +347,8 @@ void TMarker3DBox::PaintH3(TH1 *h, Option_t *option) ...@@ -344,7 +347,8 @@ void TMarker3DBox::PaintH3(TH1 *h, Option_t *option)
zmax = zmin + h->GetZaxis()->GetBinWidth(iz); zmax = zmin + h->GetZaxis()->GetBinWidth(iz);
bin = h->GetBin(ix,iy,iz); bin = h->GetBin(ix,iy,iz);
w = h->GetBinContent(bin); w = h->GetBinContent(bin);
if (w == 0) continue; if (w < wmin) continue;
if (w > wmax) w = wmax;
scale = (w-wmin)/(wmax-wmin); scale = (w-wmin)/(wmax-wmin);
m3.SetPosition(0.5*(xmin+xmax),0.5*(ymin+ymax),0.5*(zmin+zmax)); m3.SetPosition(0.5*(xmin+xmax),0.5*(ymin+ymax),0.5*(zmin+zmax));
m3.SetSize(scale*(xmax-xmin),scale*(ymax-ymin),scale*(zmax-zmin)); m3.SetSize(scale*(xmax-xmin),scale*(ymax-ymin),scale*(zmax-zmin));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment