Using a sqrt scale


Root allows you to simply change between a linear and a log scale for
the y-axis when you plot a histogram. However, I’m interested in using
a sqrt scale. (This has the advantage that the errors on all points will
have the same size.)

I looked around and found some mention about this in a fairly old post:

I looked at the TGaxis object and I guess one could use these axis objects
to piece together a sqrt scale that displays numbers of events such as
0, 1, 10, 100 etc. But then one has to manually create a histogram where
one has taken the sqrt of the data.

If someone has a simple way, or an example, that does this it would be



TGaxis is able to draw SQRT axis (tick marks are well placed) but there is no option like the LOG one (gPad–>SetLog) which also draws the histogram accordingly. So you have to modify the histogram content… “Sqrt” is not at the the same level as “Log”