[R] font question on pdf device
David Winsemius
dwinsemius at comcast.net
Fri Oct 8 15:23:15 CEST 2010
On Oct 8, 2010, at 8:44 AM, Kari Ruohonen wrote:
> Hi,
> I wonder if this is something on my machine locally or R in general.
>
> When I do the following:
>> plot(c(0,1),c(0,1),main=expression(paste(symbol("D"),"D",sep="")))
>
> I get a plot with a title having uppercase delta followed by "D".
> But in
> the following
>
>> pdf(file="deltaTest.pdf")
>> plot(c(0,1),c(0,1),main=expression(paste(symbol("D"),"D",sep="")))
>> dev.off()
The more predictable way to get "GreekDelta"-D would be:
> pdf(file="deltaTest.pdf")
> plot(c(0,1),c(0,1),main=expression(Delta*D))
> dev.off()
I.e., using the symbol font cap-delta the way is is supposed to be
used, and not misusing the paste() platmath function, which is both
unnecessary here and misleading as to standard plotmath syntax.
>
> the uppercase delta looks like O with overstrike slash, i.e. Ø.
>
> Other greek alphabets, such as Gamma, seem to work fine for pdf as
> well.
>
> My sessioninfo for this is
>
>> sessionInfo()
> R version 2.11.1 (2010-05-31)
> x86_64-pc-linux-gnu
>
> locale:
> [1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C
> [3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8
> [5] LC_MONETARY=C LC_MESSAGES=en_GB.UTF-8
> [7] LC_PAPER=en_GB.UTF-8 LC_NAME=C
> [9] LC_ADDRESS=C LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods
> base
>
> Many thanks,
> Kari
>
> ______________________________________________
> 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.
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list