Re: Q: Eliminating TPaveText-object from TGraph

Rene Brun (Rene.Brun@cern.ch)
Mon, 24 Feb 1997 18:16:08 +0100


Matthias Vitt wrote:
>
> Hi,
> Maybe the last one didn't came through, so I just try it again:
> If you have a simple canvas and you add a Tgraph object, then in the
> upper left side of the canvas a TPaveText object appears with the Title
> of the TGraph-object. Obviously this is a default behavior. How Do I
> elminiate this TPave object, using code (not with the mouse, I.E. via
> menus callbacks). Is there an option that I can give the construcor of
> the TGRAPH OBJECT ? Can I delete it with a specific function? I really
> like to know this cause I'd like to include plots generated from a
> rootscript in a paper and I don't want the graph's title on the plot.
>
> Any help is appreciated,

In version 1.0, I have implemented the possibility to remove the title
from the toolbar menu or via one single call.
With version 0.9, you can change the title position via:
gStyle->SetTitleX(xstart);
gStyle->SetTitleY(ystart);
where xstart and ystart are the top left coordinate of the title box.
xstart and ystart should normally be in the range [0,1].
However, if you specify a value outside this range (say 1.1)
the title will not be visible.
The same is true for the statistics box.

Rene Brun