I'm trying to save a plot zoom I got from using R.
My Rstudio has the option of saving that plot, but it doesn't seem to be working. There's no error message. I go through everything as normal, and then the pic never shows up in the file that it's supposed to. I've tried open the picture, and the save in the default directory, but it still doesn't show up...
Any help would be appreciated.
I can confirm this behavior in the latest release of RStudio (v. 0.99.902). A zoomed plot cannot be saved using the menus of RStudio, only the small image in the preview panel is saved with the "Export" pull-down menu. A right-click on the zoomed image, selecting "Save Image" does not work. There is no error message but nothing happens after the output directory and file name is selected and the "Save" button is clicked. I assume it's a bug. FWIW, I'm using ubuntu 16.04.
A quick workaround is to take a screenshot of the window containing the zoomed figure. There are specific OS-dependent keyboard combinations for this, like Alt+Print. Then one can use any image editor to crop the image and remove the window frame.
Other useful options have been posted as answers here, but what I've seen so far is unrelated to RStudio.
You can produce pictures automatically:
pdf("test.pdf")
plot(1, main = "my test PDF")
dev.off()
You can replace pdf("test.pdf")
by png("test.png")
or other formats of your choice.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With