2017-06-22 28 views
0

[這是一個跨張貼到R-幫助郵件列表post哪裏這個問題一直沒有得到答覆迄今][R ggplot編碼/區域設置問題-X

我與遠程的R會話和掙扎(我懷疑)區域設置相關 編碼的問題:使用X11設備(已啓用打開X11Forwarding), 每當我嘗試繪圖使用ggplot2含有變音符號的東西,我 像

Error in grid.Call(L_stringMetric, as.graphicsAnnot(x$label)) : 
    invalid use of -61 < 0 in 'X11_MetricInfo' 

使用基本圖形看到某事是罰款,是p分到另一個設備(pdf,說)。

下面是一些代碼來重現:

## ssh -X into the remote server 
## start R at the remote server 

plot(1:10, 1:10, main = "größe") 
## this opens a plot window and works as expected 

library("ggplot2") 
qplot(1:10, 1:10) 
## this works still 

qplot(1:10, 1:10) + xlab("größe") 
## I get the ERROR above 

我的設置:

  • 本地: 於Linux(Debian GNU/Linux的9)
  • 遠程 的Linux(RHEL服務器7.3版(邁波)

(也許)我的01的相關位:

Host theserver 
    HostName XXX.XXX.XXX.XXX 
    ForwardX11 yes 
    ForwardX11Timeout 596h 
    IdentityFile ~/.ssh/id_rsa 
    IdentitiesOnly yes 
    ForwardAgent yes 
    ServerAliveInterval 300 

回答

1

你有什麼版本的R(在遠程機器上)? R上3.2.5

x11(type="Xlib") 
library(grid) 
convertHeight(stringDescent("größe"), "in") 

,但不能在,例如,R 3.4.0(只是在 這兩種情況下在本地運行R):

我可以複製此。

+0

當場。它曾經是'R版本3.3.1'。我更新到'R版本3.4.0'。現在一切似乎都奏效!謝謝! – Andreas