Skip to content
Prev 310793 / 398502 Next

vectorized plotmath expressions via substitute()

I recommend using bquote(), with its .() substitution operator, instead of
substitute any time you use plotmath.    To make a vector of plotmath
expressions use the following sort of as.expression(lapply(... bquote ...)) idiom:

  plot(1:10, axes=FALSE)
  at <- axTicks(1)
  lab <- as.expression(lapply(at, function(a)bquote(10^.(a))))
  axis(1, at=at, lab=lab)

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com