Salut Sabine, En/Na Sabine Crepe-Renaudin ha escrit: > I have some problem to update canvas, I've tried the following commands : > > TFile f("myfile.root"); > TTree *myt = Mytree; > TCanvas *myc = new TCanvas("myc","myc_titre",0,0,400,600); > > myc->Divide(1,2); > myc_1->cd(); > myt->Draw("var1"); > myc->cd(2); > myt->Draw("var2"); > > Here everything works fine ... then > > myc->Divide(2,2); > myc->cd(1); > myt->Draw("var3"); > myc->cd(2); > myt->Draw("var4"); > ... > > Here my canvas is never updated ... I've tried myc->Update(); and > myc->Modified(); in different places but it does not change the result. > > Do I have to create again a new canvas before the second Divide ? Is there > something wrong in the few lines above ? just add: myc->Clear(); before the second Divide > PS. Is there an equivalent to the "wait" we can use in PAW macros between > the drawing of 2 histos ? yes: getchar(); Ciao ! -- David D'ENTERRIA - Marie-Curie PostDoc Fellow - TAPS·PHENIX·ALICE Groupe Photons SUBATECH tel: +33 2 51 85 85 60 4, A. Kastler BP 20722 · 44307 Nantes fax: +33 2 51 85 84 24 http://www-subatech.in2p3.fr/~photons mailto:enterria@in2p3.fr ---------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:38 MET