【发布时间】:2014-05-15 04:21:37
【问题描述】:
我有以下代码
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 (%)
有什么方法可以只使用 annotate 命令而不是两个来创建相同的注释?我试图将它们合并到that page 之后的一个命令中,但我总是遇到错误。
【问题讨论】: