Re: [Rd] Thin spaces

From: Prof Brian Ripley <>
Date: Sun, 12 Oct 2008 07:01:06 +0100 (BST)

On Sat, 11 Oct 2008, hadley wickham wrote:

> Hi all,
> I'm looking at providing some nicer number formatting features for
> axes in ggplot2. One thing I would like to do is use thin spaces to
> separate digits, like you can in latex. I realise I can use unicode
> spaces to do this (e.g.
>, but what are the
> possible pitfalls. Is this likely to work on all graphics devices
> across all platforms?

Unlikely to work on most devices.

They are not supported in postscript() or pdf(): neither of their underlying languages support Unicode, so they are restricted to basically one human language.

windows(), quartz() and X11() support Unicode, but in the case of X11 the fonts are often pretty incomplete so you need to check on the target machine. A quick check on windows() suggests \u2009 is not in the commonly used MS fonts (as your reference says).

All it needed was a very simple experiment to answer your question. Hint: try

plot(1:10); text(4, 6, "1\u{2009}2")

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
Received on Sun 12 Oct 2008 - 06:04:23 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 12 Oct 2008 - 15:30:19 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive