Home | News | Documentation | Download

TH3D "gl..." does not respect SetMinimum

Hello,

If we draw the TH3D with “box” options, the boxes which would represent bins with values <SetMinimum() value are not drawn. However, if the same TH3D is drawn with “glbox” options, all boxes are drawn, regardless of the SetMinimum() (and probably SetMaximum()). I suspect this may be a bug. I attach the script demonstrating the issue - drawing the same histogram in two canvases before and after SetMinimum(). To toggle between open-gl and “standard”, please modify the “draw_gl” variable at the 2nd line of the script.

glmin.C (558 Bytes)

In addition, “glcol” also does not respect SetMinimum(). Maybe here it is more difficult, but it would definitely make a lot of things easier, if parts of the TH3D below SetMinimum() value were completely transparent automatically (or disregarded in some other way).


ROOT Version: 6.18
Platform: Fedora 31
Compiler: Not Provided


Thanks for your reproducer.
I will try to change the “glbox” option to make it behave like “box”

Thank you. How about glcol?

I need to check also … working on glbox right now

This is what your macro now gives for GLBOX.

1 Like

With the GLCOL option your macro now gives me:

If that’s ok for you I can commit both fixes.

It is. Thank you very much.

I still see a little difference in the box size computation compare to the BOX option.
I am fixing it. The box option gives:

Look at the size of the boxes on the left … they are computed according to the Z min value set. GLBOX should be the same I guess.

Now it is the same:

Yes, you are right. I haven’t noticed it.

I made a PR to fix it: https://github.com/root-project/root/pull/4971

1 Like

Now pushed in master. Thanks to have reported it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.