Ron Malone
2014-05-13 20:27:43 UTC
Hello all,
I am currently using ROOT v5.34.18 for data analysis in a low-energy
nuclear physics experiment. I am running Fedora 19. As the subject line
indicates, I am struggling with the TH2::SetMinimum() method when using the
"Box" draw option. When I draw a histogram using TH2::Draw("BOX"), it seems
that SetMinimum does not have the effect I would expect.
My understanding is that for a TH2, SetMinimum should set the minimum value
of the z-axis. When the histogram is drawn, bins with contents less than
this minimum value will not be displayed. This is the behavior exhibited
when the Draw command is used with no options. However, when the "BOX"
option is used with drawing, it seems that the SetMinimum command has
little effect.
I have attached a sample macro (boxmin.C) that plots the same histogram in
various ways to demonstrate this. It loads the histogram from the file
boxes.root. There are some comments in the code to help describe what I
expect/desire to happen.
Is there a way to work around this? In the macro, I use a nested for loop
to alter the bin contents to display what I want, but I would prefer not to
do this.
Thank you,
Ron Malone
I am currently using ROOT v5.34.18 for data analysis in a low-energy
nuclear physics experiment. I am running Fedora 19. As the subject line
indicates, I am struggling with the TH2::SetMinimum() method when using the
"Box" draw option. When I draw a histogram using TH2::Draw("BOX"), it seems
that SetMinimum does not have the effect I would expect.
My understanding is that for a TH2, SetMinimum should set the minimum value
of the z-axis. When the histogram is drawn, bins with contents less than
this minimum value will not be displayed. This is the behavior exhibited
when the Draw command is used with no options. However, when the "BOX"
option is used with drawing, it seems that the SetMinimum command has
little effect.
I have attached a sample macro (boxmin.C) that plots the same histogram in
various ways to demonstrate this. It loads the histogram from the file
boxes.root. There are some comments in the code to help describe what I
expect/desire to happen.
Is there a way to work around this? In the macro, I use a nested for loop
to alter the bin contents to display what I want, but I would prefer not to
do this.
Thank you,
Ron Malone