Problem drawing multipads in macro

From: David Nitz (dfnitz@umich.edu)
Date: Fri Oct 03 1997 - 21:02:20 MEST


I'm trying to draw 4 histograms on one canvas in a macro.  The code
for the macro follows:

int fom_tag_logr_cuts()
{
  gROOT->Reset();
  TFile f("runfiles/set3.root");
  c1 = new TCanvas("c1","Figure of Merit Analysis",200,10,800,600);
  pad1 = new TPad("pad1","Best Tag Cut Before FIR ",0.03,0.52,0.48,0.97,21);
  pad2 = new TPad("pad2","Best LogR Cut Before FIR ",0.52,0.52,0.97,0.97,21);
  pad3 = new TPad("pad3","Best Tag Cut After FIR ",0.03,0.03,0.48,0.48,21);
  pad4 = new TPad("pad4","Best LogR Cut After FIR ",0.52,0.03,0.97,0.48,21);
  pad1->Draw();
  pad2->Draw();
  pad3->Draw();
  pad4->Draw();

  pad1->cd();
  h19.Draw("lego2");

  pad2->cd();
  h20.Draw("lego2");

  pad3->cd();
  h20019.Draw("lego2");

  pad4->cd();
  h20020.Draw("lego2");

  c1->Update();
  return 0;
}

What happens is that the pads are drawn, the histograms appear briefly
with their titles, then the histograms disappear, leaving me with blank
pads, except for the histogram titles, which remain.  I running  root
v1.02/00 on HP-UX 10.20.


David F. Nitz  (dfnitz@umich.edu)
Physics Department, University of Michigan



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:21 MET