zones.C

Go to the documentation of this file.
00001 void zones() {
00002 // example of script showing how to divide a canvas
00003 // into adjacent subpads + axis labels on the top and right side
00004 // of the pads.
00005 //Author; Rene Brun
00006    
00007    TCanvas *c1 = new TCanvas("c1","multipads",900,700);
00008    gStyle->SetOptStat(0);
00009    c1->Divide(2,2,0,0);
00010    TH2F *h1 = new TH2F("h1","test1",10,0,1,20,0,20);
00011    TH2F *h2 = new TH2F("h2","test2",10,0,1,20,0,100);
00012    TH2F *h3 = new TH2F("h3","test3",10,0,1,20,-1,1);
00013    TH2F *h4 = new TH2F("h4","test4",10,0,1,20,0,1000);
00014 
00015    c1->cd(1);
00016    gPad->SetTickx(2);
00017    h1->Draw();
00018 
00019    c1->cd(2);
00020    gPad->SetTickx(2);
00021    gPad->SetTicky(2);
00022    h2->GetYaxis()->SetLabelOffset(0.01);
00023    h2->Draw();
00024    
00025    c1->cd(3);
00026    h3->Draw();
00027 
00028    c1->cd(4);
00029    gPad->SetTicky(2);
00030    h4->Draw();
00031 }      

Generated on Tue Jul 5 15:44:22 2011 for ROOT_528-00b_version by  doxygen 1.5.1