2017-06-12 29 views
2

我是新来的使用R.我的朋友通常使用inkscape完成他们的R图。他们使用RStudio和Inkscape的V0.92,之后便使该地块在RStudioR复制到inkscape 0.92

Export > Copy to Clipboard > Copy as Metafile > Copy Plot 

然后在Inkscape中简单地Ctrl + V。但是当我这样做时,Inkscape中的粘贴情节就完全被破坏了。

我的例子:

在RStudio

data=c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25) 
par(pty="s") 
qqnorm(data, pch=19, cex = 0.8, xlab = "Quantis Teóricos", ylab= "Amostra", las=1, 
     main="Gráfico QQ", lwd = 0.25, cex.main=1.0, cex.lab=0.75, cex.axis=0.75, 
     font.lab=2, xlim=c(-5,5), xaxs="r", yaxs="r") 
qqline(data, lwd = 0.25) 
grid(4, 5, lwd = 0.25) 
box(lwd = 0.25) 

Image Here

然后,当我Ctrl + V在Inkscape中,我得到

a little zoom

任何人知道如何解决它???

+0

我非常感谢Inkscape - 伟大的工具! - 但与旧版本0.48相比,新版本对我来说似乎都是一种贬低。粘贴在0.48中运行良好,所以如果可以的话,你可能想要抓住它。 – lukeA

回答

2

参照link;

您不应复制/粘贴到inkspace,而是输出*.svg以稍后在该环境中对其进行编辑。

mypath <- "Path/to/the/desired/folder/myplot.svg" #Edit the path as you wish 
svg(mypath, width = 8, height = 10) 

data=c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25) 
par(pty="s") 
qqnorm(data, pch=19, cex = 0.8, xlab = "Quantis Teóricos", ylab= "Amostra", las=1, 
    main="Gráfico QQ", lwd = 0.25, cex.main=1.0, cex.lab=0.75, cex.axis=0.75, 
    font.lab=2, xlim=c(-5,5), xaxs="r", yaxs="r") 
qqline(data, lwd = 0.25) 
grid(4, 5, lwd = 0.25) 
box(lwd = 0.25) 

dev.off() 

这将为您提供一个文件,您可以稍后在Inkspace中进行编辑。