[R] Font and Color documentation

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri May 7 17:49:30 CEST 2004


This is R-specific, and R was but a glimmer of the eye when MASS (1st ed) 
was written in 1992/3.  pp. 79-84 of the current edition does have the 
information.

I think all the information you ask for is in ?par, or that points to the 
appropriate place.

Fonts are device specific.  ?par says

     'font' An integer which specifies which font to use for text.  If
          possible, device drivers arrange so that 1 corresponds to
          plain text, 2 to bold face, 3 to italic and 4 to bold italic.

and BTW, font 5 is always a symbol font.  To go beyond that you need to 
look at the documentation of the device you use.  Many devices (e.g. x11, 
windows, postscript, pdf) allow you to map fonts to those numbers.

There is a whole section on `Color Specification' in ?par, which says 
colors() gives all the known colour names, and valid numbers are from 0 to 
the size of the palette.


On Fri, 7 May 2004, Iyue Sung wrote:

>   Could someone please point me to documentation on legal font and color
> specifications (and other 'par' parameters); i.e. font=6 for Times New
> Roman, col='Red', etc.?  Searches in "?par", MASS (1st ed.) and other
> areas were unsuccessful. I thought I remember seeing it
> before...somewhere.

-- 
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