admin管理员组

文章数量:1122832

I'm working with ggplot2 and ggpubr to create a set of three plots that should be displayed next to each other. But when I knit my markdown and actually render the plots, the space between the plots and the text is massive, causing my plots to be super squished and illegible. I've tried what I can think of - theme(plot.margin) doesn't change anything, fig.height only changes the size of the margins around the multiplot, but doesn't make the plots themselves any bigger (makes them smaller in some cases), and I can't seem to figure out how to make the plots both bigger and with margins less huge.

This is the code for the chunk in RMD:

{r multi dec, echo=FALSE, fig.align='center'}
multi_sst_dec<- ggarrange(ANFS_sst_dec_10,ANFS_sst_dec_11,ANFS_sst_dec_12,
                       ncol=3,nrow=1,
                       common.legend=TRUE,
                       legend="right")
multi_sst_dec

And this is what it ends up looking like:

本文标签: How can I change the margins between my plots and the text in R MarkdownStack Overflow