I would like to add a text to my plot so that one letter, a, appears bold. I started with the following, but the result is not what I need:
plot(1:5,axes=F)
mtext(c(only a should be bold),1:1,font=2)
What should I do to make only a bold?
Complex text editing can be done with expression
. See ?plotmath
for a list of commands.
mtext(expression(paste("only ", bold("a"), " should be bold")), 1, 1)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With