{ TRandom3 rnd; TH1D *h1 = new TH1D("h1","Random data",60,0.,3.); vector vec; for(int i=0;i<1000;i++) { double x = rnd.Gaus(1.,1.); vec.push_back(x); h1->Fill(x); } TKDE *kde = new TKDE(vec.size(),vec.data(),0.,3.); TCanvas *c1 = new TCanvas("c1","",600,800); c1->Divide(1,2); c1->cd(1); h1->SetFillColor(50); h1->Draw(); c1->cd(2); kde->Draw(); }