[Related to Control alignment of two side-by-side plots in knitr ]
I cannot figure out how to arrange two side-by-side plots as explained in the knitr graphics manual page 2 (http://yihui.name/knitr/demo/graphics/). I use the following MWE and the output is below. I would like to be able to control the distance between the plots - the two plots are now too close to each other. The pdf is generated in RStudio (Knit to PDF).
I have tried to tamper with for instance par(mar = c(rep(5,4)))
, but without luck.
---
title: "Untitled"
output: pdf_document
---
## R Markdown
```{r,echo=FALSE,out.width='.49\\linewidth', fig.width=3, fig.height=3, fig.show='hold',fig.align='center'}
barplot(1:4)
barplot(4:7)
```