On Aug 19, 2010, at 2:02 PM, array chip wrote:

Hi all, let me give a simple example:

b<-20
I would like to print ylab as "P20" where "P" is printed in Italic font. When I
do the following:

plot(1, ylab=expression(paste(italic("P"),b,sep="")))

I got y axis label printed as "Pb" instead of "P20". What is the best solution
to print platmath symbols with value of the variable at the same time?


?substitute
?plotmath

 plot(1, ylab=substitute(list(italic(P)*b), list(b=b) ) )

Or:

?bquote
plot(1, ylab=bquote(italic(P)*.(b) ) )

--

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.

Reply via email to