[R] More than two font in a plot

From: Jinsong Zhao <jszhao_at_mail.hzau.edu.cn>
Date: Tue, 29 Jun 2010 22:17:16 +0800

Hi there,

I am a Chinese R user. I hope to display Chinese character in a plot, and than save it in PostScript format. I have read the article titled "Non-Standard Fonts in PostScript and PDF Graphics", especially the section about CJK fonts. I also tried the code:

> pdf("chinese.pdf", width=3, height=1)
> grid.text("\u4F60\u597D", y=2/3, gp=gpar(fontfamily="CNS1"))
> grid.text("is 'hello' in (Traditional) Chinese", y=1/3)
> dev.off()

however, it's not valid with postscript(). It seems that postscript() need to set family in postscirpt(..., family = "CNS1"). Then all the characters are in CJK font, and it's not what I hope to get. I hope the Latin character is displayed in Helvetica.

Any suggestions? Thanks in advance!


Jinsong Zhao, Ph.D.
College of Resources and Environment
Huazhong Agricultural University
Wuhan 430070, P.R. China
E-mail: jszhao_at_mail.hzau.edu.cn

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 29 Jun 2010 - 14:33:53 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 29 Jun 2010 - 23:50:43 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive