Re: TPad::Divide()

Faouzi Attallah (attallah@gsi.de)
Wed, 14 Apr 1999 15:40:39 +0200 (CED)


Thanks Paul,

This is working, hope this will be corrected/added in the Root web page.

Cheers,
Faouzi

> If you replace "c1.cd(%d) ;" with "c1_%d.cd() ;" and have i start
> at 1 it should work.
>
>
> >
> > Hi Rene,
> >
> > I failed running a zoning program (hereafter an example) as suggested in
> > TPad.html#TPad:Divide
> > and TPad:cd
> > I get always the last Draw() within a full window. Did I miss something ?
> >
> > Greetings,
> > Faouzi
> >
> > {
> > gROOT->Reset();
> > char cmd[20] ;
> >
> > c1 = new TCanvas("c1", "Zoning ",200,10,900,700);
> > c1.Divide(2,2) ;
> >
> > for(Int_t i=0 ; i < 4; i++) {
> > sprintf(cmd,"c1.cd(%d) ;",i) ;
> > printf(" --> Cmd = %s ",cmd) ;
> > gInterpreter->ProcessLine(cmd);
> > fun = new TF1("fun","abs(sin(x)/x)",1.*i,10.*i);
> > fun->Draw() ;
> > }
> > return ;
> > }
> >
> >
> > F. Attallah
> > GSI mbH
> > Planckstr 1
> > D-64291 Darmstadt
> > Tel: +49 (0)6159 71 2743
> > Fax: +49 (0)6159 71 2901
> > Email: F.Attallah@gsi.de
> >
> >
>
>
> --
> Paul M. Eugenio
> Dept. of Physics
> Carnegie Mellon University
> (412) 268 6949
> eugenio@ernest.phys.cmu.edu
>
>
> _____________________________________________________
> / The scholar should know; one builds science with \
> o O 0 / the facts just like a house can be built of stones; \
> o | but an accumulation of facts is not a science just like |
> `\|||/ \ that a pile of stones is not a house. /
> (o o) \_____________________________________________________/
> ooO_(_)_Ooo___________________________________________Henri Poincare'_
> _____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|____
> __|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_
> _____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|____
>