Re: [ROOT] Axes question...

From: Marco van Leeuwen (mvl@nikhef.nl)
Date: Wed May 31 2000 - 18:58:27 MEST


Hi Claire,

You can either control drawing options through gStyle (also using
gROOT->ForceStyle() or TH1F::SetCurrentStyle()), or directly by using the
appropriate methods of the TAxis class (e.g. TAxis *
MyAx=MyHist->GetXaxis(); MyAx->SetTitleFont(11)). For an explanation see
the HOWTO on Styles and the descriptions of classes and their member
functions in the Reference guide. 

Now, more specifically, 'boldness' is not controlled seperately. Only
a short list of font is available, of which some are bold and/or italic
and some aren't. Have a look at TAttText for the list. Use SetTitleFont
and SetLabelFont to set the fonts of axis labels and titles to your
(The functions are present in both TStyle and TAxis).

For the Tickmarks, wou want to use SetNdivisions(); you probably want 505
(i.e. five major and five minor divisions, consult the reference guide for
details). I am not aware of any way to explicitly set the tickamrks to
fixed values for an axis... 

Hope this helps,

Marco van Leeuwen.

On Wed, 31 May 2000, Claire Gwenlan wrote:

> Hello,
> 
> I'm trying to make my histograms look all pretty and, more importantly,
> reproduce a particularly look that was in a published paper.
> 
> When I plot my histograms, the axes are labelled automatically with
> numbers. For, example, I have a certain distribution ranging from 0.5 to
> 1.0 and root automatically labels the axis as,
> 
> 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1.0
> 
> Is there any way that I can specify that only some numbers are drawn so
> that I have, for example,
> 
> 0.5  0.6  0.7  0.8  0.9  1.0
> 
> Also, I know there are several different font styles and things in TText
> and TLatex but can I change the font style on the axis numbers. For
> example, can I turn off the 'bold'?
> 
> Thanks a lot,
> 
> Claire
> 
> __________________________________
>  Claire Gwenlan
>  Department of Physics & Astronomy
>  University College London
>  Gower Street
>  LONDON
>  WC1E 6BT
> 
>  Tel: (0171) 419 3454
> _________________________________
> 
> 



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:27 MET