Hi, I have tried your example. I just modify it a bit. I removed the comments and put some valid values in the TH1F constructor. So I get: { TH1F* e_Gain; e_Gain = new TH1F("e_Gain","test",100,0.,1.); TCanvas* c1 = new TCanvas("MyCanv","GainComparing",200,10,1100,1100); e_Gain->Draw("e0"); } which in principle is what you have. With these 4 lines I do not get the problem you mention here. Cheers, OC -- Org: CERN - European Laboratory for Particle Physics. Mail: 1211 Geneve 23 - Switzerland E-Mail: Olivier.Couet@cern.ch Phone: +41 22 7676522 WWW: http://cern.ch/Olivier.Couet/ Fax: +41 22 7677155 On Mon, 9 Sep 2002, Davide Gerbaudo wrote: > > Hi > I'm having some problems with this simple canvas: > > ----------------------------------------------------------------------------- > TH1F* e_Gain; > e_Gain = new TH1F(name,title,NbApv,0,NbApv); > TCanvas* c1 = new TCanvas("MyCanv","GainComparing",200,10,1100,1100); > > //c1->Update(); > //c1->SetGrid(); > > > > //e_Gain->SetMarkerStyle(20); > //e_Gain->SetMarkerColor(6); > //e_Gain->SetMarkerSize(1.1); > //e_Gain->SetXTitle("Apv nb."); > > //e_Gain->Fit("pol1","Q"); > //pol1->SetLineColor(3.5); > > e_Gain->Draw("e0"); > > > //delete MyCanv; > > ----------------------------------------------------------------------- > it seemed to work but when I run it root gives me this: > > Warning in <TCanvas::ResizePad>: MyCanv height changed from 0 to 10 > > root [5] Warning in <TCanvas::ResizePad>: MyCanv height changed from 0 to > 10 > > and it leaves the canvas empty. > > Thanks in advance > > > _-_-_-_-_-_-_-_-_-_-_-_-_- > > Davide Gerbaudo > >
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:08 MET