Under
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 2
minor 13.1
year 2011
month 07
day 08
svn rev 56322
language R
version.string R version 2.13.1 (2011-07-08)
I get a double quote mark in place of <= in the y-axis label when I run the
following.
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)
The problem also occurs if I use instead ylab=expression(prob(X <= x)))
All is well if I remove "=" but I need <=.
Frank
-----
Frank Harrell
Department of Biostatistics, Vanderbilt University
--
View this message in context:
http://r.789695.n4.nabble.com/Error-in-plotmath-tp3708153p3708153.html
Sent from the R help mailing list archive at Nabble.com.
On 2011-07-31 11:25, Frank Harrell wrote:> Under > > platform x86_64-pc-linux-gnu > arch x86_64 > os linux-gnu > system x86_64, linux-gnu > status > major 2 > minor 13.1 > year 2011 > month 07 > day 08 > svn rev 56322 > language R > version.string R version 2.13.1 (2011-07-08) > > I get a double quote mark in place of<= in the y-axis label when I run the > following. > > 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) > > The problem also occurs if I use instead ylab=expression(prob(X<= x)))Does the problem occur if you use ylab=expression("Prob[X" <= "x]")? Peter Ehlers> > All is well if I remove "=" but I need<=. > > Frank > > ----- > Frank Harrell > Department of Biostatistics, Vanderbilt University > -- > View this message in context: http://r.789695.n4.nabble.com/Error-in-plotmath-tp3708153p3708153.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org 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.
Frank Harrell <f.harrell <at> vanderbilt.edu> writes:> > Under > > platform x86_64-pc-linux-gnu > arch x86_64 > os linux-gnu > system x86_64, linux-gnu > status > major 2 > minor 13.1 > year 2011 > month 07 > day 08 > svn rev 56322 > language R > version.string R version 2.13.1 (2011-07-08) > > I get a double quote mark in place of <= in the y-axis label when I run the > following. > > 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) > > The problem also occurs if I use instead ylab=expression(prob(X <= x))) > > All is well if I remove "=" but I need <=. > > Frank >Works for me on 2.13.0 alpha, 32-bit Linux (OK, I need to update this) and R-devel. Is this in an X11() window or in PDF? Could it be a PDF font/viewer problem?> sessionInfo()R version 2.13.0 alpha (2011-03-18 r54865) Platform: i686-pc-linux-gnu (32-bit) locale: [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8 [5] LC_MONETARY=C LC_MESSAGES=en_CA.UTF-8 [7] LC_PAPER=en_CA.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] grid_2.13.0 lattice_0.19-29 nlme_3.1-101 tools_2.13.0 =========== R Under development (unstable) (2011-07-26 r56507) Platform: i686-pc-linux-gnu (32-bit) locale: [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8 [5] LC_MONETARY=en_CA.UTF-8 LC_MESSAGES=en_CA.UTF-8 [7] LC_PAPER=C LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] grid_2.14.0 lattice_0.19-30 nlme_3.1-102
Works also for me..... sessionInfo() R version 2.13.1 (2011-07-08) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=fr_FR.UTF-8 LC_NUMERIC=C [3] LC_TIME=fr_FR.UTF-8 LC_COLLATE=fr_FR.UTF-8 [5] LC_MONETARY=C LC_MESSAGES=fr_FR.UTF-8 [7] LC_PAPER=fr_FR.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] grid stats graphics grDevices utils datasets [7] methods base other attached packages: [1] stringr_0.5 ggplot2_0.8.9 proto_0.3-9.2 reshape_0.8.4 [5] plyr_1.6 MASS_7.3-14 -- View this message in context: http://r.789695.n4.nabble.com/Error-in-plotmath-tp3708153p3708429.html Sent from the R help mailing list archive at Nabble.com.
Both of these work on my system:
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, "]"))) # FH
lines(ecdf(x), cex=.5)
plot(xs, cdf, type='l', ylim=c(0,1),
xlab=expression(x),
ylab=expression("Prob[X" <= "x]")) # PE
lines(ecdf(x), cex = 0.5)
> sessionInfo()
R version 2.13.1 Patched (2011-07-21 r56468)
Platform: x86_64-pc-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets grid methods
[8] base
other attached packages:
[1] directlabels_1.3 sos_1.3-1 brew_1.0-6 lattice_0.19-30
[5] ggplot2_0.8.9 proto_0.3-9.2 reshape_0.8.4 plyr_1.5.2
Dennis
On Sun, Jul 31, 2011 at 11:25 AM, Frank Harrell
<f.harrell at vanderbilt.edu> wrote:> Under
>
> platform ? ? ? x86_64-pc-linux-gnu
> arch ? ? ? ? ? x86_64
> os ? ? ? ? ? ? linux-gnu
> system ? ? ? ? x86_64, linux-gnu
> status
> major ? ? ? ? ?2
> minor ? ? ? ? ?13.1
> year ? ? ? ? ? 2011
> month ? ? ? ? ?07
> day ? ? ? ? ? ?08
> svn rev ? ? ? ?56322
> language ? ? ? R
> version.string R version 2.13.1 (2011-07-08)
>
> I get a double quote mark in place of <= in the y-axis label when I run
the
> following.
>
> 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)
>
> The problem also occurs if I use instead ylab=expression(prob(X <= x)))
>
> All is well if I remove "=" but I need <=.
>
> Frank
>
> -----
> Frank Harrell
> Department of Biostatistics, Vanderbilt University
> --
> View this message in context:
http://r.789695.n4.nabble.com/Error-in-plotmath-tp3708153p3708153.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org 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.
>