【发布时间】:2021-01-02 11:22:22
【问题描述】:
可重现的例子:
x1<-rnorm(5,5,1)
y1<-rnorm(5,5,1)
d<-data.frame(x1,y1)
ggplot(data=d,aes(x=x1,y=y1))+
geom_point()+
ylab(bquote('y (since year s'* ~ 1^st*' day)'))
我想在“年”之后添加一个撇号,我尝试添加'\\'',但它不起作用。
已经有几个关于上标的问题问了:
Subscripts and superscripts "-" or "+" with ggplot2 axis labels? (ionic chemical notation)
How to write chemical formulas in ggplot
ggplot labels adding superscript, how to come out of the superscript?
但我找不到任何将它与撇号(由上标表达式识别)组合的词。
【问题讨论】:
标签: r ggplot2 apostrophe superscript