Adjusting figure margins in Rmarkdown

You might try using the chunk option 'out.width'. Here is the Rmd file that I used. I think that it does what you want.

    ---
    output: pdf_document
    ---


    ```{r, out.width='\\textwidth', fig.height = 8, fig.align='center'}
    pie(c(0.57, 0.43), font = 2, col = c("tomato", "white"))

    pie(c(0.57, 0.43), font = 2, col = c("blue", "orange"))
    ```

Your figure size is constrained by the document margins unless you specify an out.width. If your figure width is larger than the margins of the page, then R Markdown/knitr will create a figure of the specified aspect ratio but shrink it down to fit within the margins.

To solve this, use out.width to set the width and height of the plot in the pdf. Something like:

```{r, fig.align = "center", fig.height = 8, fig.width = 8,
    out.width = "8.5in"}

pie(a, labels = lbls,  font = 2, col = c("tomato", "white"), cex=2)
pie(b, lbls2, font = 2, col = c("tomato", "white"), cex=2) 
mtext(side=3, text="Plan Breakdown: Top 20% of Users")
pie(c, lbls3,  font = 2, col = c("tomato", "white"))
````

See this page on knitr chunk options for more information.


I had the same problem, seems some cropping is applyied by default, adding this in the yaml-header worked for me:

output: 
  pdf_document: 
    fig_crop: no