On Dec 8, 2011, at 9:53 PM, Remko Duursma wrote:
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).
I couldn't understand from your statement what you were "having
trouble" with achieving, and even after running your example I am
still not clear. If your goal is to get the bottom the the expression
lined up with the bottom of the axis labels inserted with mtext then
try padj=.2
--
David Winsemius, MD
West Hartford, CT
______________________________________________
R-help@r-project.org 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.