I used a simpler funtcion to see what’s going on:
TH2D *h2;
TF1 *fcm;
TGaxis *g1;
void funaxis()
{
h2 = new TH2D("h2", "Lab Frame to CoM Frame energy scale",
100, 1.e9, 1.e20, 100, 1.e9, 1.e15);
h2->SetStats(kFALSE);
h2->SetXTitle("Lab Frame energy (eV)");
h2->SetYTitle("CoM Frame energy (eV)");
fcm = new TF1("fcm", "x*x",0.1, 10.);
g1 = new TGaxis(1.e9, 1.e11, 1.e20, 1.e11, "fcm", 510, "");
h2->Draw();
fcm->Draw("same");
g1->Draw();
c1->SetLogy();
c1->SetLogx();
c1->Update();
}
You can see that the axis limits are the limits of the function and that the ticks are spread according to x*x …
Like in log scales: the labels are the same as the linear scale but the ticks are spread according to the log of the values.
Seems to me the option G in the example you mentioned is wrong …