Re: stat box, TPave with log scale, include with CINT

Rene Brun (Rene.Brun@cern.ch)
Wed, 14 May 1997 11:33:41 +0200


Otto Schaile wrote:
>
> Dear roots,
> here a few questions:
>
> - how can one switch off/on drawing of the statistics box for histos
> (in a macro)
>
to switch off the stat box
Root > gStyle->SetOptStat(0);
to switch off the title
Root > gStyle->SetOptTitle(0)

These two commands can be placed in your rootlogon.C file.
You can also disable these two options via the Canvas toolbar menu.

> - TPaveLabel in Pads (histos) with log scale are ?? difficult ?? to place

I agree.
You can try
Root > pl = new TPaveLabel(x0,y0,x1,y1,"label","brNDC")

The NDC (Normalized Device Coordinate) means that the specified
coordinates x0,y0,x1,y1 are given in the pad NDC system [0,1]
You are independent of the lin/log scale.
I have modified the graphics editor in the new version in such a way
that all TPave (or derived classes) objects are correctly drawn
in lin or log scales.

>
> - compiling with c++ needs e.g. #include <TFile.h>, when using the
> same code with CINT it complains not to find TFile.h (off course it
> doesnt need it). How can I avoid changing the code?
>

You can insert your includes in a ifndef directive.
The __CINT__ is recognized by the CINT interpreter.

#ifndef __CINT__
#include <TFile.h>
#endif
{
// macro
}

> (I apologize if I didnt read the doc carefuly enough)
This should be better documented anyhow.

Rene Brun