[R] Change the Chinese/English fonts in the Lattice graphic package
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Mar 13 10:15:43 CET 2013
This is little to do with lattice (and 'font=2' is for base graphics:
lattice is based on grid). You may well not have bold or italic Chinese
fonts.
Font families are set for the device. You have not followed the posting
guide: it asked for 'at a minimum' information about your setup. So we
cannot even guess what graphics device you used.
On 13/03/2013 03:14, jpm miao wrote:
> Hi,
>
> I am graphing with the following command in the Lattice and LatticeExtra
> package
>
> xyplot(xts,lty=c(1,2),col=c("blue","red"),type=c("l","g"),par.settings =
> list(layout.heights = list(panel = c(2, 2))), aspect="xy",xlab="",ylab="%",
> key=key1,screen=list(a,a,b,b,c,c,d,d), layout=c(2,2),
> scales=list(x="same",y="same"))
>
> where a, b, c, d contains English and Chinese characters
>
> How can I modify the preceding line to change the fonts?
>
> (1) I find from the manual that font=2 represents boldface, while 3
> represents italics. Where should I add it?
>
> (2) The default Chinese character seems to be ²Ó©úÅé (Shi Ming Tee). How
> can I change it to Kai -Shu (·¢®Ñ)?
>
> Thanks,
>
> Miao
>
> [[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