Reputation: 2279
I'm new using R. My friends usually use inkscape for finishing their R plots. They use RStudio and Inkscape v0.92, after they make the plots in RStudio
Export > Copy to Clipboard > Copy as Metafile > Copy Plot
Then simply Ctrl + V
in inkscape. But when I do that, the pasted plot in inkscape is completly destroyed.
My example:
In 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)
Then, when I Ctrl + V
in inkscape, I get
Any one knows how to fix it???
Upvotes: 2
Views: 276
Reputation: 29153
In reference to this link;
You should not copy/paste into inkspace but make an output of *.svg
to later edit it in that environment.
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()
This will give you a file that you can later edit in Inkspace.
Upvotes: 2