0

When exporting plots to a .docx with the officer package, a lot of white space is created around the plots.

enter image description here

That way it is using up way to much space in the word document. It would be nice to crop the picture to get rid of the white space around the plot, so it looks more like this:

enter image description here

I don't know (1) if I have to set the dimension/size of the plot when I create the plot or (2) when I export the plot to the .docx with officer package.

Because I have a lot of plots that are getting exported (which are roughly of the same content and seize), I am looking for a good way to let them look the same.

BanffBoss122
  • 149
  • 9
  • Have you tried to set the margins with par(mai=...) or par(mar=...). I don't know about officer package, but large margins are a usual nuisance with R plots. – Pere Oct 23 '20 at 17:49
  • 1
    That needs to be done with you plot API (looks like ggplot2 here), not with officer. officer only send your graphic to Word. If you really want to crop images, have a look at package `magick` but I think you should only play with ggplot theme. – David Gohel Oct 23 '20 at 20:01

0 Answers0