Hi Mariusz You probably need to add "fits->Update();" after each "LShpxx->Draw();", in order to force the canvas to refresh (i.e. show each profile when you draw it - note that when you "draw" you are in fact only adding an object to the canvas's list of things to display, but not telling it to display them straight away). Hope this helps John Mariusz Sapinski wrote: > I got in my macro: > > TCanvas *fits=new TCanvas(); > fits->Divide(2,2); > >(..) > > TProfile *LShp02 = LShape02->ProfileX("",0,100); > LShp02->Rebin(LShp02->GetNbinsX()/nbinsc); > LShp02->Fit(f1,"IM","",downfit,upfit); > fits->cd(1); LShp02->Draw(); > > TProfile *LShp03 = LShape03->ProfileX("",0,100); > LShp03->Rebin(LShp03->GetNbinsX()/nbinsc); > LShp03->Fit(f1,"IM","",downfit,upfit); > fits->cd(2); LShp03->Draw(); > > (...) > > fits->Update(); > fits->SaveAs("fits.ps"); > >And what is saved in the file is one, last profile. As if Divide() >function was not working at all. > >I use root 3.04 on RH 7.3 > > > > -- John D. Frankland Beam Coordinator GANIL B.P. 55027 14076 CAEN Cedex 05 tel: +33 (0)231454628 fax: +33 (0)231454665
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET