Skip to content

bquote question

2 messages · Andras Farkas, David Winsemius

#
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?

much appreciate your help...
 
Andras
#
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.