About TH2D histogram

Hi rooters.
I am creating a TH2 histogram,in my pad has drawn a line.But i was waiting Spectrum of mass as 2d histogram.Have a simple way of changing it?
my code:
{
TCanvas *cg=new TCanvas(“cg”,"",100,100,500,800);
TH2D *h=new TH2D(“h”,“HIST_g”,100,40,160,100,40,160);
ifstream in(“mass.txt”);
double m1,m2;

for ( int i=0;i<100000 ;i++) {
in>>m1>>m2;
h->Fill(m1,m2);
}
h->Draw(“colz”);
}

I am not really sure to understand what you mean. The plotting option you are using should show you a color plot. I cannot run your macro because you did not send the file mass.txt. Can you send a runable example ?

Dear Couet.
How can i create 2D histogram from two gausian(fill it randomly) which center of situeted at (96,130) and (130,96).I was also tried but compiled incorrectly.
Thanks.

{
   TH2F *h = new TH2F("h","h",40,0,150,40,0,150);   
   TRandom r;
   Int_t i;
   for (i=0;i<20000;i++) h->Fill(r.Gaus(96,10),r.Gaus(130,10)); 
   for (i=0;i<20000;i++) h->Fill(r.Gaus(130,10),r.Gaus(96,10)); 
   h->Draw("lego1"); 
}

Thank you very much Couet.