/* * problem.C * * Created on: 1 paź 2016 * Author: Daniel Wielanek * E-mail: daniel.wielanek@gmail.com * Warsaw University of Technology, Faculty of Physics */ void problem(){ TH1D *h = new TH1D("h","h;x;y",100,0,1); h->Fill(2); TH1D *h2 = (TH1D*)h->Clone(); TCanvas *c1 = new TCanvas(); c1->Range(0,0,1,1); c1->cd(); TPad *first_pad = new TPad("first pad", "first pad",0,0,0.6,1); first_pad->Draw(); first_pad->cd(); first_pad->SetBottomMargin(0.2); first_pad->SetTopMargin(0); first_pad->SetLeftMargin(0.333333); first_pad->SetRightMargin(0); h->Draw(); c1->cd(); TPad *second_pad = new TPad("first pad", "first pad",0.6,0,1,1); second_pad->Draw(); second_pad->cd(); second_pad->SetBottomMargin(0.2); second_pad->SetTopMargin(0); second_pad->SetLeftMargin(0); second_pad->SetRightMargin(0); h2->Draw(); }