[R] How to draw a per mille symbol?

From: Gavin Simpson <gavin.simpson_at_ucl.ac.uk>
Date: Tue 19 Sep 2006 - 16:29:40 GMT


Dear list,

Following advice posted to this list a while back by Prof Ripley [1], I have been trying to draw a per mille character [2] in an axis label.

This should give the correct character:

plot(1:10, ylab = "\u2030")

but all I get is '"S'. I'm running linux (FC5) and have fonts installed that have the correct character (viewed in the Gnome character map at least).

I have also tried plotting to a pdf device with a font family that the character map tool shows I have a per mille glyph for, e.g.:

pdf("~/tmp/test_per_mille.pdf", paper = "a4", family = "URWBookman") plot(1:10, ylab = "\u2030")
dev.off()

But all I get here is a period or a dot-like symbol.

I've tried this in R 2.4.0 alpha [4] and R 2.5.0 to be [4] as my self-compiled R 2.3.1-patched dies when plotting Unicode characters (fixed in 2.4.0 alpha and above [3])

Can anyone point me in the right direction to get this working?

TIA, G

[1] http://finzi.psych.upenn.edu/R/Rhelp02a/archive/48709.html
[2] like a "%" but with 2 circles at the bottom not one, see
http://en.wikipedia.org/wiki/Permille
[3] see thread at http://article.gmane.org/gmane.comp.lang.r.devel/9704
[4] R version 2.4.0 alpha (2006-09-19 r39410)
[5] R version 2.5.0 Under development (unstable) (2006-09-19 r39410)

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Gavin Simpson                 [t] +44 (0)20 7679 0522
 ECRC & ENSIS, UCL Geography,  [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

______________________________________________
R-help@stat.math.ethz.ch 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.
Received on Wed Sep 20 02:32:17 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 20 Sep 2006 - 04:30:05 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.