[R] lattice + plotmath: how to get a variable in bold face?

Marius Hofert m_hofert at web.de
Fri Jun 3 00:50:11 CEST 2011


Dear all,

How can I get a bold "1000" in the title? I would like to use a variable (as opposed to putting in "1000" directly).

library(lattice)
N <- 1000
xyplot(0~0, xlab.top=list(label=as.expression(bquote(bold("foo" ~ .(N) ~ "bar"))), font=2, cex=1.2)) 
## => "font=2" is ignored (of course)

Cheers,

Marius


More information about the R-help mailing list