# Show slices of TH3 in 3D view

**URL:** <https://root-forum.cern.ch/t/show-slices-of-th3-in-3d-view/43071>\
**Category:** Newbie\
**Tags:** graphics\
**Created:** [January 12, 2021, 11:16am UTC](https://root-forum.cern.ch/t/show-slices-of-th3-in-3d-view/43071 "2021-01-12T11:16:16Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![youngrootuser](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/y/ccd318/32.png) [@youngrootuser](https://root-forum.cern.ch/u/youngrootuser)\
**Post date:** [January 13, 2021, 6:45pm UTC](https://root-forum.cern.ch/t/show-slices-of-th3-in-3d-view/43071/6 "2021-01-13T18:45:47Z")

</div>

I see how this is done [in this post](https://root-forum.cern.ch/t/plot-4d-histogram/26419/13). Unfortunately this not really what I want because the markers do not form a nice surface.

I found that using OpenGL is heading in the right direction. It looks like I want to do the exact same thing as [here](https://root-forum.cern.ch/t/th3-opengl-drawing-options/4841/3). I found a way that is very close to want I want:  
If hist is my TH3F\*, I do

double max=hist-\>GetMaximum()+1;  
hist-\>SetMinimum(max+1); //do not show any bins  
hist-\>Draw(“glbox”);

Now, I can move slices through the volume on which cuts are shown in colors.There are only three things missing:

1. I would like to set the positions of the planes programmatically
2. I would like to add more than only one slice per axis
3. I need the color palette that was used to create the cuts  
Do you have any ideas how to this this?

---

_[View the full topic](https://root-forum.cern.ch/t/show-slices-of-th3-in-3d-view/43071)._
