Add less than symbol, “<”, to a ggplot via geom_text in R

こ雲淡風輕ζ 提交于 2019-12-03 08:55:51

This should do it:

g <- ggplot(data=df, aes(x=a,y=b)) + geom_point()
g + annotate("text", x=5,y=4,parse=TRUE, label="beta==1.00 * ' p<0.0001'")

It's a matter of splitting the label with single quotes to the side of the whitespace and connecting two label bits with *. You also need the == for equals to.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!