(no subject)

From: Tancredi Carli (Tancredi.Carli@cern.ch)
Date: Wed Jul 02 2003 - 15:56:05 MEST


 Hello,

  I have a problem to draw on a canvas with two pads
 from a compiled program.

 Everything work fine, if one looks step-by-step,
 but when I draw in the second pad, the first one
 is erased. I do not have this problem when I use
 the interactive Root.

 Can anybody send me an example how to solve this problem ?

 I do:

  theApp= new TApplication("Output", 0, NULL); 
  chis=new TCanvas("chis", "histos",  10,800, 1010, 240);
  chis->Divide(2,1);
  TH2F *hr1 = new TH2F("hr1","bla1 ",2,-2.4,40.,2,0,11.);
  TH2F *hr2 = new TH2F("hr2","bla2 ",2,-2.4,40.,2,0,11.);

  hr1->Fill(something)
  hr2->Fill(somethingelse)

  chis->cd(1);
  hr1->Draw();
  chis->cd(2);
  hr2->Draw();
 
 chis->Update();

 theApp->Run(1);

 Many thanks.


+-------------------------------------------------------------------+
|  Tancredi Carli                     tancredi.carli@cern.ch        |
|  CERN, Division EP                  phone  ++41 22 767 9606       |
|  CH-1211 Geneva 23                  Room   40-1-C06               |
+-------------------------------------------------------------------+



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET