[R] R-1.8.1-4: Font family, ticks and mathematical expression??

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Mar 17 14:07:23 CET 2004


On Wed, 17 Mar 2004, Pisut Tempatarachoke wrote:

> Hi all,
> 
> Could anyone help answer the following questions, please?
> (I'm using R-1.8.1-4 on Fedora Core 1 and very new to R)
> 
> (i) Is it possible to specify a font family (e.g. courier or helvetica) 
> when graphing?

`when graphing' means what?  Some graphics devices, e.g. postscript and
pdf support families.  X11() does not in 1.8.1 but will in 1.9.0, due
early April.

> (ii) How can I make ticks point inwards on all four sides of a plot?  Is 
> it possible to have minor and major ticks?

Their height (including direction) is controlled by par's tcl and tck --
this is in `An Introduction to R'. See ?par.

You cna get major and minor ticks by calling axis twice with different par 
values, if I understand you aright.

> (iii) How would I specify a symbol "\sim" (i.e. "~") in a mathematical 
> expression?  So far, I've only seen "%~~%", but that's not exactly what 
> I'm after.  (I tried "%~%" but that didn't work.)

Try demo(plotmath) for what is supported.  \sim is just a character in the 
symbol font, but I don't know how to access those directly.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list