you can either use GetBinContent/SetBinContent to fill a new histogram with the proper bin borders, or a little hack: use GetBinLabel to set the label to the result of your transformation as if it was text, e.g. looping over bin number i: hist->SetBinLabel(i, Form("%g",(i-1)/5000.)).
[quote=“Axel”]or a little hack: use GetBinLabel to set the label to the result of your transformation as if it was text, e.g. looping over bin number i: hist->SetBinLabel(i, Form("%g",(i-1)/5000.)).
[/quote]
Axel, are there any side effects of TAxis::SetLimits()?
no, your approach is fine for a linear conversion, so it should work for Chris, too. The SetBinLabel approach also works for non-linear axis conversions.