[R] Error in plotmath

James Cloos cloos+r-help at jhcloos.com
Mon Aug 1 00:21:44 CEST 2011


I can confirm the " instead of ≤, using the default X11 device.

I use a Gentoo amd64 box, R-2.13.0.

Using ylab=expression("Prob[X" <= "x]") didn’t change things.

(The " might actually be a ″ (DOUBLE PRIME); it is hard to tell.)

OTOH, using a utf8-encoded ≤ works:

set.seed(6)
x<- rnorm(30, 100, 20)
xs<- seq(50, 150, length=150)
cdf<- pnorm(xs, 100, 20)
plot(xs, cdf, type='l', ylim=c(0,1),
      xlab=expression(x),
      ylab=expression(paste("Prob[X ≤ x]")))
lines(ecdf(x), cex=.5)

I ran the scripts in ESS, but that shouldn't affect the plots.

-JimC
-- 
James Cloos <cloos at jhcloos.com>         OpenPGP: 1024D/ED7DAEA6



More information about the R-help mailing list