Re: [ROOT] Different statistics boxes on different pads.

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Aug 26 2003 - 11:31:36 MEST


Hi Elliott,

It is difficult to give a diagnostic without your code?
Could you send a running script showing the problem.
I also suggest you look at:
      http://root.cern.ch/root/HowtoPS.html
in particular the section "Writing several canvases to the same Postscript file'

Rene Brun

Elliott Cheu wrote:
> 
> 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