[R] changing plot font for Times new roman

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Aug 19 11:29:40 CEST 2008


For X11 the family is "Times" (not "times").  See ?X11Fonts for the 
alternative "serif".

Font values > 5 apply only to the Windows family of devices, and can be 
changed there via the Rdevga file.  But family="serif" works there too 
(although its 'Times New Roman' may not be identical to that on X11, but 
then what you get on X11 depends on the support software installed, in 
particular fontconfig's knowledge of fonts -- on my system it is using 
the URW clone).

On Mon, 18 Aug 2008, milton ruser wrote:

> Dear all,
>
> I know that it is a know issue, but I would like to change
> the type of font on my plot, and I am not sure the
> rigth way. I would like to use Times New Roman font,
> but according to the "par()" help, some device allow
> we choose an family of fonts. I tryed par(family="times")
> without success.
>
> Surfing on R archieve I got an suggestion of
> use par(font.lab=6), but when I go to the
> par(font.lab) help the highest value there is 5.
> How can I have sure that font.lab=6 is the Times
> New Roman?
>
> Thanks in advance,
>
> miltinho astronauta
> brazil
> ---
>
> op<-par()
>
> x11(800,500)
> par(mfrow=c(1,2))
>
> x<-plot(runif(100),rnorm(100) , main="standard font")
>
> par(font.lab=6)
> par(font.axis=6)
>
> x<-plot(runif(100),rnorm(100) , main="font=6")
> par<-op
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

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