2017-06-22 80 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