[R] Bold Substring in mtext (newbie question)

Gabor Grothendieck ggrothendieck at gmail.com
Sun Feb 25 16:32:31 CET 2007


Try this:

plot(1)
mtext(quote(A ~ bold(bold) ~ word), cex = 1.3)

On 2/24/07, Joseph Retzer <joe_retzer at yahoo.com> wrote:
> Hi everyone,
>  I suspect this is an easy task however I've not been able to accomplish it. I'd like to create an mtext title which has certain words bold, the rest not bold. So far I've been able to create one which is all bold, one which is all not bold and one which has bold and not bold superimposed on one another. Any suggestion would be appreciated.
> Many thanks,
> Joe Retzer
>
> # Not bold
> mtext(paste("Overall Satisfaction Call Difference vs. Overall Satisfaction Rep. Difference"), outer = TRUE, cex = 1.3)
>
> # Bold
>  mtext(expression(bold("Overall Satisfaction Call Difference vs. Overall Satisfaction Rep. Difference")), outer = TRUE, cex = 1.3)
>
> # I'd like to have just the 2 occurrences of the word "Difference" being bold
>
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>



More information about the R-help mailing list