TGraph transpose


So I have a TGraphAsymmErrors, gr1 that is fitted with a custom function.

Now I want to transpose the x-axis of this TGraphAsymmErrors, such that
newX = exp(oldX). The y-axis will remain unchanged.

and re-plot gr1 with the newX as the X-axis. I can do this just fine for the graph itself, but I don’t know how to do this for the fit line. Does anyone know?

So for the TGraphAsymmErrors itself I do something like :

for(Int_t pi=numpts-1; pi >= 0; pi–)
aa = (TMath::Exp(-1.*(gr1->GetX()[pi])));



  • Sujeewa

If you change the graph data you must recreate a new function.