Problem drawing aitoff and tgraph together

Hello Rooters,

I am trying to draw a skymap, which is easily done with the aitoff projection. Unfortunately, there are not built in gridlines that are also drawn, which makes the map hard to read. Fortunately, berder posted a nice example that draws the grid lines using TGraphs. The problem I have is that when I draw my histogram using the aitoff projection, the TGraphs don’t also get drawn in the same pad. If I draw my histogram any other way, they do. I have tried it with both version 5.12_f and development, neither work. I’ve attached my code (SkymapProb.C) as well as the root file from which the data comes (SkymapProb.root). Thanks a lot for any help you can offer!

-eric
SkymapProb.C (2.55 KB)
SkymapProb.root (233 KB)

The conversion into aitoff should be wrong somewhere. We can see all the little graphs on the plot, they are clearly wrong. I am looking at it now.

Here is the working macro. The aitoff representation is drawn using a 3D algorithm having special units. I have created a transparent pad on top with the correct units and then the grid appear. Another way would have been to convert the graphs into these special units.



SkymapProb.C (3.07 KB)