How to set fYlowNDC or fHNDC for multiple pads on a canvas

//I have two pads on a canvas.
TCanvas *c1=new TCanvas(“c1”,"",1000,1000);
c1->Divide(1,2);

//I set the margins to 0.
c1->cd(1);
c1->cd(1)->SetBottomMargin(0);
c1->cd(2);
c1->cd(2)->SetTopMargin(0);

//I draw a axis on each.
c1->GetPad(1)->DrawFrame(0,0,1,1);
c1->GetPad(2)->DrawFrame(0,0,1,1);

//But the top of the 2nd frame does not touch the bottom of the top frame because the pads don’t butt up against each other. This could be reduced using either fYLowNDC or fHNDC of the two pads but I can’t figure out how to change them. Is it possible, other than grabbing the pad with the mouse and dragging it?

Yes it is possible and you can get the answer saving the canvas in a .C macro after you had move the pads using the mouse. This is a general technique when you want to know which command correspond to a mouse action.

Using the tried and true method of just saving the canvas to a macro…I figure the only way to do this is to define your own TPads and draw them on the TCanvas (not using TCanvas::Divide). Not a problem really. Thanks for the suggestion, I definitely should have thought of that.