[R] Correct Computer Modern font in postscript(..) output

Mark Van De Vyver mvdv at spamcop.net
Mon Mar 15 06:41:01 CET 2004


Hi,
I'm trying to get the correct font used when generating italic text in an R
grahic.  I have a set of labels that print correctly except it seems the
italic text is justr a slanted version of the TeX computer modern normal
font...  I'm using R v1.8.1 on Windows XP, and I get the same result if I
build the pdf using Adobe Acrobat or using MikTeX

The labels:

grpNames<-c(expression(paste("lo ", italic(d[n]))),
expression(italic(d[n])), expression(paste("hi ", italic(d[n]))),
            expression(paste("lo ", italic(LM[1]))),
expression(italic(LM[1])), expression(paste("hi ", italic(LM[1]))),
            expression(italic(d[n])), expression(italic(LM[1])),
expression(italic(LM[2])))

The postscript command:

postscript(file = "Rplots.ps",
           onefile = F, height=6,width=10,
           paper="a4", family="ComputerModern",bg="transparent",
           horizontal=F, pointsize=10,
           print.it=F)

Is this the best currently available, or is there some way to get the
correct font used when using italics?

TIA
Mark




More information about the R-help mailing list