I am a bit confused by the documentation on the spherical draw option SPH for 2D histograms. The doucmentation (e.g. http://root.cern.ch/root/html/THistPainter.html#HP00) states: “The X coordinate is mapped on the latitude and the Y coordinate on the longitude.”
But when I create such a plot, it looks like Y is mapped to latitude and X to longitude. One can infer the same from some forum posts (e.g. http://root.cern.ch/phpBB3//viewtopic.php?t=5595, [url]Gl - option, spherical coordinates and axis
Is the documentation wrong. Or is it actually implemented different then intended?
Thank you for any help,
Yes the documentation could be wrong. Do you have a small macro showing it ?
Here is an example with the two functions SphericalPlotWrong and SphericalPlotCorrect. It tries to generate a histogram such that each 2D bin corresponds to the same solid angle, i.e. the latitude bins will not be equidistant. In the wrong case (done as the documentation suggests) one immediately sees the non-equidistant bins along the longitude.
But my main question is: Is it really a documentation bug or an implementation bug? In other words. Could it be that the longitude/latitude mapping will be change in later versions of Root?
SphericalPlot.C (828 Bytes)
No, this code has not changed for years. I’ll check and let you know.
Very likely it is a documentation bug.