> On Aug 18, 2017, at 7:27 AM, Andras Farkas via R-help <r-help@r-project.org> > wrote: > > Dear All, > > could you please provide input on the following: > > plot(1:10,main=paste("\n ","\nABCD","\n ","\n ","\n > "),cex.main=1.3) > > a<-500 > b<-12 > mtext(bquote(bold(.(formatC(1.2*a,decimal.mark=",",digits=2,format="f")))~ " > words "~bold(.(b))~" words"~"\n "~"\n ")) > > > > as you will see form the sub-title only the result of > formatC(1.2*a,decimal.mark=",",digits=2,format="f") gets bolded, while the > part bold(.(b)) does not seem to bold the letter 'b'... In addition, the > spacing ("\n ") at the end of the mtext line also does not seem to get > recognized.... any thoughts on what I may be doing wrong?
Failing to read the ?plotmath page. Numeric values do not get bolded. You will need to wrap with as.character(). And "\n"'s are not recognized. -- David. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.