Exporting an image from inline previews

It's occasionally handy to get a PNG file of a figure to share in an email, on twitter, etc. In the pre-markdown days I would use the export button in the plots viewer to do this. How do I (efficiently) do this from inline output?

I know I can use ggplot2::ggsave(), or go into the settings for the document and change inline output to console output. But surely there's a way to do it from inside the document without messing up the real purpose of the document?

I'm still using 1.0.143 on this machine ... maybe that's the answer.

1 Like

AHA! right click gives this menu of tantalizing options. Copy image works as advertised. Download image? Maybe, but haven't been able to find resulting image.

There's actually no straightforward way to do this, unfortunately. The easiest workaround is to click Preview, and then to open the preview in a browser window. From there you can easily save the image to disk.

I've filed an issue here:

1 Like

This may be considered cheating, but have you considered making a Command + Shift + 4 selective screen capture

Cheating is always an acceptable solution ! But the resolution of a scrrenshot often seems poor compared to an exported file.