Re: [R] greek letters, text, and values in labels

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Fri 28 Jul 2006 - 00:55:58 EST

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@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@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.
>



R-help@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. Received on Fri Jul 28 01:02:39 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 28 Jul 2006 - 02:21:11 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.