Change scale of a TH1F (energy calibration)

OK now I understand your question. This is possible with some approximation as in principle to make a clean operation you would need to start from teh original unbinned x values. The approximation could be the following

TH1F *h; //your original histogram int nbins = h->GetXaxis()->GetNbins(); TH1F *hnew = new TH1F("hnew","title",nbins,xminnew,xmaxnew); for (int i=1;i<=nbins;i++0 { double y = h->getBinContent(i); double x = h->GetXaxis()->GetBinCenter(i); double xnew = alpha*x + beta; //your transformation hnew->Fill(xnew,y); }
You may want to look also to TH1::Rebin (case xbins != 0) and see the procedure to recmpute errors in case the original hist has errors.

Rene