[R] "Low Pain" Unicode Characters in pdf graph?

David Winsemius dwinsemius at comcast.net
Sun May 15 16:05:57 CEST 2011


On May 15, 2011, at 9:06 AM, ivo welch wrote:

> Dear R-experts---is there a relatively low-pain way to get unicode
> characters into a plot to a pdf device?
>
> pdf(file="cardsymbols.pdf")
> plot( 0, xlim=c(0,5), ylim=c(0,5), type="n")
> text(1,1, "♠")
> text(2,2, "♥")
> text(3,3, "♦")
> text(4,4, "♣")
> dev.off()
>
> (these are the characters that I need the most NOW, but this is a more
> generic question.)

The last examples in ?points should be reviewed and tested. It is  
cited by the ?plotmath page as a way of getting at symbols.

-- 
David Winsemius, MD
Heritage Laboratories
West Hartford, CT



More information about the R-help mailing list