2014-06-19 6 views
4

축 레이블로 그리스 기호가있는 동물원 시리즈를 플로팅하려고합니다.R 동물원 플롯에서 축 레이블에 대한 그리스 기호

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 

어떤 아이디어 이유 : 여기

코드인가?

+2

나에게 버그 것 같다 사용하면 zoo 패키지 메인테이너

내가이 일을 만들 수있는 유일한 방법에보고해야한다고 생각에도'플롯 (동물원 때문에 (101 : 110,1 : 10), xlab = bquote (mu ~ '='~ (mu_val)))'작동 –

+0

패키지 관리자에게 문의하십시오. – agstudy

답변

0

당신은 당신이) (역 추적을 할 경우, 도움에서 title 기능에 문제가 그것을 볼 수 있습니다

plot(zoo(101:110,1:10),ylab=expression(paste(mu,"=1")))

시도 할 수 ?title

They must be of type character or expression. In the latter case, quite a bit of mathematical 
notation is available such as sub- and superscripts, greek letters, fractions, etc: see plotmath 

enter image description here

+0

"= 1"을 런타임에 변수 세트로 지정하고 싶습니다. – user2623214

2

그것을 내가 의견으로 말했듯이,

도 내게 버그처럼 보입니다.

plot(zoo(101:110,1:10),xlab=bquote(mu~'='~.(mu_val)))

작품입니다. 나는 title

plot(zoo(101:110,1:10),ylab="") 
title(ylab = bquote(mu~'='~.(mu_val))) 

enter image description here