Strange problem with drawing on divided TCanvas

hello,

I am not sure about output which I get.
I attached just most important parts of my code because it is long.

Int_t pro = 7;
TCanvas *c1;
TH1D *roz [pro];

for(Int_t k=0; k< pro ;k++){ 
      roz[k] = new TH1D(("aa"+nn).c_str(),"x", ile, start, end);

//part of code where histograms are filled

        if(k==0){
		    c1= new TCanvas("can" ,"W",100,100,1024,1024);
		    c1->Divide(1,pro);
	 	  }

		  c1->cd(k+1);
	  	  roz[k]->Draw();
}

The thing which I do not understand is that I receive two Canvases with that distribution of histograms.
Can you tell me why it occurs and how to eliminate that?

cheers

[code]#include “TString.h”
#include “TH1.h”
#include “TCanvas.h”

void try_me(void)
{

const Int_t pro = 7;
TCanvas *c1;
TH1D *roz[pro];

for(Int_t k = 0; k < pro; k++) {
roz[k] = new TH1D((TString(“aa”) + ((long)k)).Data(), “x”, 100, 0, 1);

//part of code where histograms are filled

if (k==0) {
  c1= new TCanvas("can" ,"W", 100, 100, 700, 700);
  c1->Divide(1, pro);
  // c1->Modified();
  c1->Update();
}

c1->cd(k+1);
roz[k]->Draw();
// c1->Modified();
c1->Update();

}

}[/code]

Thank you for your fast reply but unfortunately it does not change anything.
I still have the same output scheme as before.
Maybe some information will be essential like that I use older version of ROOT 5.28/00b and I compile it with ACLiC

cheers

I am sorry for double post but I found that due to fits in my code this problem occurs.
When I am fitting without drawing results, everything is fine except that I do not obtain fit results which are essential.

I do not have an idea how to combine these two things.

[quote=“Pepe Le Pew”]See the … Warning when using the option "0"
http://root.cern.ch/root/html/TH1.html#TH1:Fit%1[/quote]

your help is invaluable.

cheers

See the … Warning when using the option "0"
http://root.cern.ch/root/html528/TH1.html#TH1:Fit%1