{
   gROOT->Reset();
   
   //method1. compute ymax to get a commensurate range
   // 1 pixel must correspond to the same range in x and y
   TCanvas c1("c1","c1",10,10,800,600);
   Float_t xmin = 0;
   Float_t xmax = 20;
   Float_t ymin = -2;
   Int_t npx = gPad->GetWw();
   Int_t npy = gPad->GetWh();
   Float_t ymax = ymin + (xmax-xmin)*npy/npx;
   TH2F h("h","",20,xmin,xmax,20,ymin,ymax);
   h.Draw();
   TArc a1(6,4,6);
   a1.Draw();
   
   //method2. set a square virtual canvas size in a non-square canvas 
   TCanvas c2("c2","c2",200,50,800,600);
   c2.SetCanvasSize(700,700);
   c2.DrawFrame(0,0,20,20);
   TArc a2(10,10,10);
   a2.Draw();
}

