void plot_histo () { // ...to illustrate an apparent bug in root plotting of a histogram TCanvas *cr = new TCanvas("cr","cr",1,1,400,600); cr->SetTopMargin(0.03); cr->SetBottomMargin(.2); cr->SetRightMargin(0.03); cr->SetLeftMargin(0.13); cr->SetTickx(1); cr->SetTicky(); cr->Divide(1,2); TH1D *h = new TH1D("h", "h", 3, 0, 3.); // histo of interest h->SetBinContent(1, 0.8); h->SetBinContent(2, 1.4); h->SetBinContent(3, 0.6); h->SetLineColor(kRed); h->SetLineWidth(3); h->SetLineStyle(1); h->SetMarkerSize(2.0); h->SetMarkerStyle(20); dum=new TH2D("dum","dum",10,0,3.0,10,0,2); // ...full hist range dum2=new TH2D("dum2","dum1",10,0.0001,2.9999,10,0,2); // ... and reduced by epsilon cr->cd(1); dum->Draw(); h->Draw("SAMEhist"); h->Draw("sameP"); cr->cd(2); dum2->Draw(); h->Draw("SAMEhist"); h->Draw("sameP"); }