[R] greek letters, text, and values in labels
Gabor Grothendieck
ggrothendieck at gmail.com
Thu Jul 27 16:55:58 CEST 2006
Try this where gr and theta are as in your post:
xyplot(1~1|gr,
main = as.expression(bquote(theta == .(theta))),
strip = strip.custom(factor.levels = expression(theta, beta))
)
On 7/27/06, Valentin Todorov <valentin.to at gmail.com> wrote:
> Unfortunately this does not work for lattice graphics. In such case I
> do something like the following, but I still do not know how to plot
> Greek letters in the panel titles:
>
> theta <- 2.1
> gr <- as.factor(c(1,2))
> levels(gr)[1]<-"Group 1"
> levels(gr)[2]<-"Group 2"
> library(lattice)
> print(xyplot(1~1|gr,
> xlab=eval(substitute(expression(paste(theta, " = ", tval)),
> list(tval=theta))),
> ylab=eval(substitute(expression(paste(theta, " = ", tval)),
> list(tval=theta))),
> main=eval(substitute(expression(paste("Results for ",theta, " = ",
> tval)), list(tval=theta))),
> sub=eval(substitute(expression(paste(theta, " = ", tval)),
> list(tval=theta)))
> ))
>
>
> best,
> valentin
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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