Exporting plot into Word via clipboard pastes unexpected outline or borders

If I export a plot and use "copy to clipboard" function in preview pane, to paste a plot into a Word doc, the image comes through okay except for additional lines above and to the LHS of the plot, as if the "copy to clipboard" action is picking up the extent of the preview panel and making that visible. I have come across this before if I tried to export from a very small preview panel, but now it's happening all the time; I've tried replotting some data I was working on a month ago, which plotted fine at the time but now have this ghost partial border. I've been using ggplot to make the plots, which are nothing fancy - example of two plots, one a boxplot using ggplot/geom_boxplot, the other a heatmap generated using # image(data, axes = F, col = terrain.colors(100))


I've used dev.off() to make sure I am only running one device, and have closed down and started a new session, but other than that I have no idea where to go from here.

I've recently updated, so I'm running R v. 3.4.4 and RStudio 1.2.1335 on Windows 10, and would be grateful for any help with this.
cheers, Melanie


Referred here from support.rstudio.com

Would you mind filing this as a bug report at https://github.com/rstudio/rstudio/issues, so we don't lose track of this?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.