Bug: Gl-in-pad axis binning are reversed

Hello Rooters

I am using more and more gl-in-pad’s mode. When I draw a 2D histogram using regular mode, the x and y axis are corrrect, but when I display the same histogram in opengl, the bin numbering are reverted (and wrong).


Can you explain, please, what is wrong for you?

//2x2 2D hist, x range: -1..1, y range: -2..2.
TH2D * hist = new TH2D("lala", "lala", 2, -1., 1., 2, -2., 2.);
hist->SetBinContent(1, 1, 100);//do you understand, where is this bin?

Look at bin_1_1.jpg, look at axes and status bar (it shows binx and biny number)
After that, in ROOT console:

root [4] hist->SetBinContent(1, 2, 60);

See bin_1_2.jpg, axes and status bar.

root [4] hist->SetBinContent(2, 1, 30);


root [4] hist->SetBinContent(2, 2, 45);

So, what’s wrong?

It’s not a bug. I draw lego hist from with viewer positioned in “positive quadrant”, that’s one of standard ways for mathematical pictures, look. for example, here:

en.wikipedia.org/wiki/Image:Cart … h_grid.svg

I have to draw axes on front edges of plot’s frame (I think it should be clear why). So, we have such picture.
You can rotate non-gl plot and obtain the same results, look at my

Oups! I see my mistake now! Sorry for that.