[R] n-dash instead of hyphens in plots

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Jul 26 12:23:37 CEST 2013

On 26/07/2013 09:36, Anders Sand wrote:
> Dear community,
> How do I change the hyphens that appear when using '-' to n-dash in, for
> example, x-axes?
> Example code:
> axis(1, c(1:2), c("1-4", "23-26"), tck=.05)

On what device on what platform?   The commonest answer would be

'if you want en-dash not hyphen, ask for en-dash and not hyphen'

en-dash is "\u2013" where that is supported.

> Thanks
> Anders
> 	[[alternative HTML version deleted]]
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

This did ask for 'at a minimum' information and no HTML.

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