[R] Align expression and text in mtext()
Remko Duursma
remkoduursma at gmail.com
Fri Dec 9 03:53:32 CET 2011
Dear R-helpers,
I have trouble aligning an expression with a subscript, and text, in margin
text:
par(mar=c(6,6,1,1))
b <- barplot(1:3)
mtext(c("A","B","C"), at=b, side=1, line=1, cex=1.3)
mtext(expression(italic(C)[a]~(more~text)), at=0, line=1, side=1,cex=1.3)
As explained in the help files and elsewhere, I understand that the
expression is aligned by the bounding box, not the lower end of the 'text'
in the expression. Playing with adj or padj in mtext() does not really solve
this?
Any suggestions or workarounds?
PS, I tried using a phantom() expression for the text bits; but this messes
up the horizontal alignment).
thanks,
Remko
--
View this message in context: http://r.789695.n4.nabble.com/Align-expression-and-text-in-mtext-tp4175286p4175286.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list