Re: [ROOT] Layout of plots etc.

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Apr 06 2001 - 14:38:06 MEST


Hi Phil,

If you use Root version 3.00/06 (production release), you already
have the possibility to give font sizes in pixels. See:
  http://root.cern.ch/root/htmldoc/TAttText.html

{
   gROOT->Reset();
   gStyle->SetLabelFont(23,"x"); //use font 2 precision 3 
   gStyle->SetLabelSize(14,"x"); //set label size in pixels
   gStyle->SetLabelFont(23,"y");
   gStyle->SetLabelSize(14,"y");
   TH1F h("h","h",100,-3,3);
   h.FillRandom("gaus");
   h.Draw();
}

Font precision 3 works for all types of text, except for the "title"
and "stats" box. stats and title will also accept precision 3 in the
next release.

Rene Brun


Phil Adamson wrote:
> 
> Hi Rene + people,
> 
> When I'm making plots, I would like to be able to specify the layout as
> something like "use a 12 point font for the labels and axis titles, put
> the axis title 30 points from the axis", so that whatever the size of the
> pad the (graph, histogram etc.) is plotted in, I always have, say, 2cm
> borders to contain the axis labels + titles, but the size of the plot is
> altered to fit the pad.
> 
> Is there any chace that ROOT will support the ability to specify the sizes
> of some things as fixed, rather than have everything scale with the pad
> size?
> 
>         Phil



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:41 MET