[ROOT] RE: compiled program and canvas division

From: Philippe Canal (pcanal@fnal.gov)
Date: Wed Jul 02 2003 - 18:37:16 MEST


Hi,

Please always put a subject for your message to roottalk.  See
http://root.cern.ch/root/roottalk/RoottalkRules.html

With the latest version of ROOT I am unable to reproduce your problem (using
the code your provided).  Please try a newer version of ROOT or send more
information.

Cheers,
Philippe.

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Tancredi Carli
Sent: Wednesday, July 02, 2003 8:56 AM
To: roottalk@pcroot.cern.ch
Subject:



 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