Skip to content
Prev 257423 / 398506 Next

splom, plotmath: how to add three lines of information with alignment?

Hi,

This is always a challenge with expressions vs calls, etc. grid.table
expects an input that can be coerced into a matrix of unevaluated
expressions. This seems to work,

info <- function(a,b){
  grid.table(c(bquote(alpha==.(a)), bquote(beta==.(b))),
             parse=TRUE, # parse labels as expressions
             theme=theme.list(
               gpar.corefill=gpar(fill=NA, col=NA), # make bg transparent
              core.just="left") # justification of labels
             )
}
xyplot(1~1, panel=function(...) info(0.1, 0.5) )


HTH,

baptiste
On 20 April 2011 07:52, Marius Hofert <m_hofert at web.de> wrote: