[R] Boxplot superscript y-axis
Carlos Rivera
limnorivera at gmail.com
Tue May 29 20:32:08 CEST 2012
Dear Prof. Eduardo,
Try this:
rot<-expression(paste("DGL growth (cm.yr"^"-1",")"))
boxplot(five$gr13~five$Code, xlab="Species code", ylab=rot)
In this page there are some useful mathematical annotations in R:
http://stat.ethz.ch/R-manual/R-patched/library/grDevices/html/plotmath.html
Best wishes,
Carlos Rivera
-----Mensaje original-----
De: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] En
nombre de eduardo van den Berg
Enviado el: martes, 29 de mayo de 2012 17:24
Para: r-help at r-project.org
Asunto: [R] Boxplot superscript y-axis
Dear list,
I need to include in a superscript number (-1) in a y-axis label of a
boxplot graphic. I tried the following line:
>boxplot(five$gr13~five$Code, xlab="Species code",
ylab=substitute(paste("DGL growth (cm.yr"^{-1},")")))
It returns the following error message:
Error in "DGL growth (cm.yr"^{ : non-numeric argument to binary operator
I used the same line for the plot function in another graphic and it worked
perfectly well.
Any suggestions?
--
Prof. Eduardo van den Berg
Dpto. de Biologia - Universidade Federal de Lavras Cx. P. 3037 37200-000,
Lavras, MG, Brasil Tel 35-3829-1917 E-mail eduardo.lavras at gmail.com
[[alternative HTML version deleted]]
______________________________________________
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.
More information about the R-help
mailing list