2012-12-21 3 views
1

Cross posted on Google groups of ggplot이 포함되어야합니다 gglocator (ggplot2)의 재현 예를 들어 아래오류 : 뷰포트 경로는 적어도 하나의 뷰포트 이름

을 :

library(ggplot2) 
library(ggmap) 
df <- data.frame(xvar = 1:10, yvar = 1:10) 
qplot(xvar, yvar, data = df) + annotate(geom = 'point', x = 3, y = 6) 
gglocator(4) 

작품 sessionInfo()openSUSE 11.4 (64 bit)에 완벽하게 정상적으로

> sessionInfo() 
R version 2.15.1 (2012-06-22) 
Platform: x86_64-unknown-linux-gnu (64-bit) 

locale: 
[1] LC_CTYPE=en_US.UTF-8  LC_NUMERIC=C    
[3] LC_TIME=en_US.UTF-8  LC_COLLATE=en_US.UTF-8 
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 
[7] LC_PAPER=C     LC_NAME=C    
[9] LC_ADDRESS=C    LC_TELEPHONE=C   
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C  

attached base packages: 
[1] stats  graphics grDevices utils  datasets methods base 

other attached packages: 
[1] ggmap_2.1  ggplot2_0.9.1 

loaded via a namespace (and not attached): 
[1] colorspace_1.1-1 dichromat_1.2-4 digest_0.5.2  grid_2.15.1  
[5] labeling_0.1  MASS_7.3-18  memoise_0.1  munsell_0.3  
[9] plyr_1.7.1   png_0.1-4   proto_0.3-9.2  RColorBrewer_1.0-5 
[13] reshape2_1.2.1  RgoogleMaps_1.2.0 rjson_0.2.8  scales_0.2.1  
[17] stringr_0.6  

를 실행하면 동일한 코드에서 오류 (제목 참조)가 발생합니다. sessionInfo()와 6,113,210은 다음과 같다 : Windows

> sessionInfo() 
R version 2.15.1 (2012-06-22) 
Platform: i386-pc-mingw32/i386 (32-bit) 

locale: 
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252 
[3] LC_MONETARY=English_United States.1252 
[4] LC_NUMERIC=C       
[5] LC_TIME=English_United States.1252 

attached base packages: 
[1] stats  graphics grDevices utils  datasets methods base  

ggplot2 버전 0.9.2이며, Linux에이 0.9.1입니다.

알려진 버그입니까, 아니면 한 점이 누락 되었습니까?

답변

1

Windows에서이 문제를 재현 할 수 있습니다. gglocator

x <- x[grep("panel-", grid.ls(print = message)[[1]])] 

위한 grep의 코드에서 사실

은 '패널 -'가 포함 된 GROB를 찾을 수 없습니다. 이 리눅스에서 작동하는지 이유 나를 위해

x[grep("panel", grid.ls(print = message)[[1]])] 
[1] "panel.3-4-3-4"     "panel.background.rect.5210"  "panel.grid.minor.y.polyline.5212" "panel.grid.minor.x.polyline.5214" 
[5] "panel.grid.major.y.polyline.5216" "panel.grid.major.x.polyline.5218" "panel.border.zeroGrob.5207" 

-

나는를 제거하지

.

+0

'내가 리눅스에서 작동하는 이유는 없다. '리눅스의'ggplot2' 버전은 Windows와 다릅니다. –

+0

@ annishaKaul 'this'는 내가 리눅스에서 실행하면이 코드를 의미합니다. 문제는 ggplot2가 아닌 ggmap에 있습니다. – agstudy

+0

좋아, 고마워. –