标签: r ggplot2 annotate
在下面的虚拟代码中,我想以粗体显示单词“bold”,并以红色显示所有单词“red”。如何使用一个annotate()进行操作?
annotate()
library(ggplot2) ggplot(mtcars, aes(x = wt, y = mpg)) + geom_point() + annotate("text", x = 4, y = 25, label = "This is bold. This is red.\nThis is red again")