我想将乳胶文本添加到ggplot2图中annotate().使用expression(),描述在这里添加乳胶轴标签,似乎并没有工作.以机智:
# Use expression() to create subscripted text
p <- ggplot(mpg, aes(x=cty, y=hwy)) + geom_point() +
  scale_x_continuous(expression(text[subscript])) 
# But expression() in annotate adds nothing to the plot
p + annotate("text", x=10, y=40, label=expression(text[subscript])) 
# Passing regular text to annotate works fine
p + annotate("text", x=10, y=40, label="foo") 
为什么expressions的处理方式annotate与其他ggplot函数不同?我怎样才能用乳胶注释?