On Feb 16, 2010, at 12:18 PM, e-letter wrote:
On 16/02/2010, Peter Ehlers <ehl...@ucalgary.ca> wrote:
On 2010-02-16 9:21, e-letter wrote:
Readers,
I tried to the following commands:
plot(y~x,ylab=expression(A[1]~B[2],xlab=expression(C~D))
mtext(expression(A[1]~B[2]),"additional text",side=3,line=1)
Your plot() call is not reproducible.
Anyway, try
mtext(expression(A[1]~B[2]~~"additional text"),side=3,line=1)
Thank you. I had seen the command (~~) in the help guide for the
package plotmath(grdevices), but there is no statement that this
command can be used to join the expression to literal text.
It's not a "command", it's one of the available separators (or
connectors depending on how you think about them) for expressions. If
you wanted no separation between adjacent terms, you would use a
"*" (asterisk). You cannot use "," because it creates a separate
element in the expression vector:
plot(1,1)
mtext(expression(A[1]~B[2],"additional text", "more
text"),side=3,line=1:3)
(Which results in the reverse order of what this newbie expected.)
--
David Winsemius, MD
Heritage Laboratories
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.