Log scale in a divide TCanvas

Quick question

I have done this

c1=fEcanvas->GetCanvas();
c1->SetLogy();
c1->SetLogx();
c1->Divide(2,1);
c1->cd(1);
//I have tried the following lines too
//c1->SetLogy();
//c1->SetLogx();

but I cannot get the log scales in one of the canvas. How can I do that?
Thank you,

Cristian

If you divide a canvas into subpads, you must set the lin/log settings for each canvas.

c1=fEcanvas->GetCanvas(); c1->Divide(2,1); TPad *p1 = c1->cd(1); p1->SetLogy(); p1->SetLogx();

Rene

hi Rene
It ended up being:

TPad p1 = (TPad )(c1->cd(1));
To correct some error when converting from ‘TVirtualPad
’ to ‘TPad

Thanks for the quick response.
Cristian