[R] Plotting female and male signs

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Jun 8 13:48:28 CEST 2006


On Thu, 8 Jun 2006, Hans Gardfjell wrote:

> Dear R-users,
>
> Just like other users (as seen from previous posts on the list), I would
> like to use female and male signs in plots. I found B. Ripley's post
> about using Unicode characters. However, it doesn't works for me.
>
> > text(locator(1),"\u2640")  produces the following error:
> Error: invalid \uxxxx sequence
>
> But I can specify other Unicode characters as long I don't exceed 00FF,
> so this works
>
> > text(locator(1),"\u00FF") or
> > text(locator(1),"\u00E6") and also without preceeding 00
> > text(locator(1),"\uE6")
>
> Can someone give me a hint?
> I'm using a Swedish locale on WindowsXP and my R version is 2.3.1
> Patched (2006-06-04 r38279)

Unicode characters only work if they are valid in the locale: for these, 
only in UTF-8 locales (hence not on Windows).

If you were referring to

http://finzi.psych.upenn.edu/R/Rhelp02a/archive/63615.html

it did say

   You don't tell us your platform and the answer depends on the platform.

   Alternatively, look at the Hershey fonts, which have these and many
   other symbols (not necessarily of publication-quality though).


-- 
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