我正在尝试绘制一个带有希腊符号作为轴标签的动物园系列图。
以下是代码:
mu_val <- 1
plot(1:10,101:110,main=bquote(mu~'='~.(mu_val))) ## works fine
plot(1:10,101:110,ylab=bquote(mu~'='~.(mu_val))) ## works fine
plot(zoo(101:110,1:10),main=bquote(mu~'='~.(mu_val))) ## works fine
plot(zoo(101:110,1:10),ylab=bquote(mu~'='~.(mu_val))) ## gives error
## Error in title(...) : invalid mathematical annotation
有什么想法吗?
plot(zoo(101:110,1:10),xlab=bquote(mu~'='~.(mu_val)))
也可以工作。 - David Arenburg