{ auto c5 = new TCanvas("c5","c5",700,400); c5->Divide(2,1); auto hz1 = new TH1F("hz1","Bar-chart drawn from 0",20,-3,3); auto hz2 = new TH2F("hz2","Lego plot drawn from 0",20,-3,3,20,-3,3); Int_t i; double x,y; hz1->SetFillColor(kBlue); hz2->SetFillColor(kBlue); for (i=0;i<10000;i++) { x = gRandom->Gaus(0,1); y = gRandom->Gaus(0,1); if (x>0) { hz1->Fill(x,1); hz2->Fill(x,y,1); } else { hz1->Fill(x,-1); hz2->Fill(x,y,-2); } } c5->cd(1); hz1->Draw("bar2 min0"); c5->cd(2); hz2->Draw("lego1 min0"); }