[ROOT] Different statistics boxes on different pads.

From: Elliott Cheu (elliott@physics.arizona.edu)
Date: Tue Aug 26 2003 - 01:35:17 MEST


Hi,

I am using root v3.05.07a under RedHat Linux.

I am creating a standalone executable and would like to
be able to display different styles of statistics boxes
in different pads. Currently I am using the following code
fragment.

=======================================================================

for (unsigned int hist = 0; hist < thePage->Name.size(); hist++) {
  canvas->cd(pad);

  // Get histogram name and options
  // Code left out
  // ---------------------------------------------

  TH1 *h = (TH1 *)Histogram(name.c_str(), K_FILE);

  if (stat_value > 0) {
    if (pad > 1) {
      canvas->Modified();
      canvas->Update();
    }
    gStyle->SetOptStat(stat_value);
  }

  h->Draw();

  if (stat_value > 0) {
    gPad->Modified();
    gPad->Update();
  }

  canvas->Modified();
  canvas->Update();
}

========================================================================

The problem is that while this works in the X windows display, 
when I make a postscript output of the page, the pad which 
has its statistics box changed is obscured by a blank pad.

  TPostScript ps(filename, K_LANDSCAPE);
  DrawPage(fCurrentPage);
  ps.Close();

Do you know how I might fix this behavior?

Thanks.

Elliott Cheu



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