I am currently trying of saving several plots to put them in my word document for presentation. Some bar plots have 4 columns, others have 8. I would like to adapt the size of the bar plots with only 4 or 5 columns, so that they are only have of the width as the bar plots with 8 bars. In other words: In my word document all the plots should have about the same height, where as the width of the plots should vary depending on the number of columns.
I tried to follow the instructions on Set the size of ggsave exactly but I can change the height or width in ggsave() to any number and if I put the saved plots into word it doesn't make any difference.
ggsave(ggsave(file = "plot_9.jpeg",
plot = plot_9,
width = 8, height = 9, units = "cm",
dpi = 300))
ggsave(ggsave(file = "plot_9.jpeg",
plot = plot_9,
width = 5, height = 9, units = "cm",
dpi = 300))