Include more room in an R Markdown document for figures that are created via a package's plot method?

I am trying to knit an R Markdown document (to HTML, PDF, or Gitbook format) that includes (base) plots created by a package that (MCMCglmm) automatically (via a plot method) creates them for every coefficient in a model.

My problem is there is no space for them!

This is how they look in my R Studio plot viewer pane:


But, this is how they look in R Markdown output (whether I render to HTML, PDF, or Gitbook format) - they are too small:

Is there any way I can automatically size these larger? Or, do I need to allocate more size for all of the plots? Some other possible solution?

You can specify the plot dimensions on the code chunk header e.g.

```{r base_plot, fig.height=5, fig.width=10}

or set it globally with knitr::opts_chunk$set()

1 Like

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.