text() R-function - how to change the font of a single word?

前端 未结 1 918
孤城傲影
孤城傲影 2021-01-20 19:57
text(x, y, font=2, \"text\")

changes the font of the whole \'text\'.

But is it possible to change the font of a single word in \'text\'?

相关标签:
1条回答
  • 2021-01-20 20:20

    Yep!

    plot.new()
    text(0.5,0.5, expression(paste(bold("bold")," not bold")))
    

    Take a look at ?plotmath for a whole slew of other options and symbols that can be used.

    0 讨论(0)
提交回复
热议问题