{ using namespace RooFit; TH1D *hist = new TH1D("hist","test histogram",6,-0.5,5.5); for(int i=0;i<6;i++) hist->SetBinContent(i+1,i); RooRealVar x("x","x",-0.5,5.5); RooDataHist data("data","data",x,hist); RooPlot *frame = x.frame(); data.plotOn(frame,LineWidth(2),MarkerSize(2.)); frame->Draw(); }