【问题标题】:R copy to inkscape 0.92R复制到inkscape 0.92
【发布时间】:2017-06-12 22:40:31
【问题描述】:

我是使用 R 的新手。我的朋友通常使用 inkscape 来完成他们的 R 绘图。他们在 RStudio 中制作绘图后使用 RStudio 和 Inkscape v0.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)

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

有人知道怎么解决吗???

【问题讨论】:

  • 我非常感谢 Inkscape - 很棒的工具! - 但与旧的 0.48 相比,较新的版本对我来说似乎都是一种改进。粘贴在 0.48 中工作得很好,所以如果可以的话,你可能想抓住它......

标签: r plot copy-paste inkscape metafile


【解决方案1】:

参考这个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 中编辑的文件。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-11
    • 2013-08-17
    相关资源
    最近更新 更多