Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在我的情节中添加一个 R^2 值。我将标签传递给 geom_text() 如下;
geom_text(aes(x,y,label=caption),parse=T, data.frame(x=-2,y=80,caption=("R^2=0.43"))))
但它绘制为 =(R^2,0.43)。有任何想法吗?
您希望您的标题为“R^2==0.43”。查看 的帮助页面plotmath。在那里它表明==给你平等。
plotmath
==
编辑:
要回答问题后的评论,您可以在表达式中使用 atop。"atop(R^2==0.43,p==0.763)" 这适用于两行,但不是更多。
"atop(R^2==0.43,p==0.763)"