我有以下代码
standard_text = "(%)"
plotmath_text <- "I^2"
g <- ggplot(data=data.frame(x=0,y=0))+geom_point(aes(x=x,y=y))
g+ annotate("text", x = 4.3, y = 6.97, label =standard_text)+
annotate("text",x = 4, y = 7, cex = 7, label = plotmath_text,parse = TRUE )生成一个图形,其中右上角有注释。
I^2 (%)
是否有任何方法可以使用一次而不是两次注释命令来创建相同的注释?我尝试将它们合并到那一页之后的一个命令中,但是我总是收到错误。
https://stackoverflow.com/questions/22835939
复制相似问题