{ TF1 *f = new TF1("f", "gaus"); f->SetParameter(0, 100); f->SetParameter(1, 0.0); f->SetParameter(2, 20.0); TCanvas *c = new TCanvas("c", "c", 0, 0, 800, 300); c->Divide(2, 1, 0.001, 0.001); TH1D *h = new TH1D("h", "h", 100, -50.0, 50.0); h->FillRandom("f"); TH1D *h_copy = (TH1D*)h->Clone(); c->cd(1); h_copy->Draw(); h->SetBins(200, -50, 50); h->Rebuild(); c->cd(2); h->Draw(); }