TH2F::SetShowProjectionX/Y not working?

Hello,
I am using root 6.06/04 and it looks like TH2F::SetShowProjectionX/Y is not working as expected:

  1. No “dark” window is super-imposed on the 2d histogram
  2. moving the cursor horizontally doesn’t produce any result, either I use SetShowProjectionX or
    SetShowProjectionY method.

I attach a TFile containing a TH2F named gg2.

Am I missing something?

Many thanks and best regards,
Marco Bomben
newfile.root (36.5 KB)

Can you also provide de commands you are using ?

Hello,
I draw the plot (gg2->Draw(“colz”)), I right click on the plot, I select ‘SetShowProjectionX’ or ‘SetShowProjectionY’, type ‘10’ in the dialog and then move the mouse.
Best regards,
Marco Bomben

seems ok for me.


Hello,
I see that after a SetShowProjectionX ‘session’, if don’t close the newly created canvas I don’t get the correct result for a SetShowProjectionY but I still get the SetShowProjectionX result, so to say.

Plus I saw that in root 5.34.XY there was a dark stripe over the 2D histogram when I was moving my curson over it.

Many thanks and best regards,
Marco Bomben

Yes when you change the projection (Y ->X or X ->Y) you need to kill the projection canvas.
Yes with the X11 version of ROOt the dark strip drawn is Xor mode shows the projected bins .

Thanks a lot for the answer. You can close this ticket.
Best regards,
Marco Bomben