2

我是使用 R 的新手。我的朋友通常使用 inkscape 来完成他们的 R 绘图。他们在 RStudio 中制作绘图后使用 RStudio 和 Inkscape v0.92

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

然后简单地Ctrl + V在inkscape中。但是当我这样做时,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)

图片在这里

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

一点变焦

有谁知道怎么解决???

4

1 回答 1

2

参考此链接

您不应将其复制/粘贴到墨水空间中,而应将其输出*.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 中编辑的文件。

于 2017-06-12T22:48:00.330 回答