Transfer the of a TPad to another one

Dear all,

I have a canvas displaying an histo, with the logX set to true and a few other options belonging to the TPad.

I want to divide the canvas and to re-display the histogram in the first sub-pad exactly as it was displayed in the canvas.

My problem is to transfer the TPad properties of the main canvas to the sub-pad. I would prefer not to do it one by one…

Is there a way of doing this? How to store or transfer the properties of a pad, such as the logx or logy ?

Thanks in advance,

Barth

see a possible example below

Rene

{ TCanvas *c1 = new TCanvas("c1"); TH1F *h = new TH1F("h","test",100,-3,3); h->FillRandom("gaus",5000); h->Draw(); TCanvas *c2 = new TCanvas("c2"); c2->Divide(2,2); c2->cd(1); c1->DrawClonePad(); }