title: How to save plots in R and have them nice looking
body: <p>I'm trying to make a plot in R with some data and a table beneath it. In R, it looks good (Picture 1), however, when I export the picture (Picture 2), it looks really ugly and is not in same format. </p>
  
  <pre><code>library(tidyverse)
  library(cowplot)
  
  
  p &lt;- ggplot(iris, aes(Sepal.Length, Petal.Length, col = Species))  + geom_point()
  
  info &lt;- iris %&gt;% group_by(Species) %&gt;% summarise_all(mean)
  
  table_plot &lt;- tableGrob(info, theme = ttheme_default(base_size = 8), rows = NULL)
  
  plot_total &lt;- plot_grid(p, table_plot, nrow = 2, rel_heights = c(4 / 5, 1 / 5))
  plot_total
  
  save_plot("iris.png", plot_total)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/nuRc5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nuRc5.png" alt="Picture1"></a></p>
  
  <p><a href="https://i.stack.imgur.com/4IAjv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4IAjv.png" alt="Picture2"></a></p>