我正在尝试plotmath
在绘图标签中使用 R 数学符号。在标签中,我尝试使用等号,例如
ggplot(data=NULL) +
geom_point(aes(x=0.5, y=0)) +
geom_text(aes(x=0.5, y=-0.1),
label = paste("x == frac(3,2) == 1.5"), parse=TRUE) +
xlim(-1,1) +
ylim(-1, 1)
但是,我收到以下错误:
Error in parse(text = text[[i]]) : <text>:1:16: Unexpected '=='
1: x == frac(3,2) ==
^
是否可以在标签中使用两个等号?
(这是这个问题的后续问题。)