I found this MWE for side-by-side plots in Knitr+Latex, and I attempted to convert it to R Markdown using HTML output. This is what I tried:
```{r, fig.show='hold', fig.width=3, fig.height=2.5, out.width=".49\\textwidth"}
par(mar = c(4, 4, .1, .1), cex.lab = .95, cex.axis = .9, mgp = c(2, .7, 0), tcl = -.3)
plot(cars)
boxplot(cars$dist,xlab='dist')
```
However it seems to generate nothing at all. I'm having the same problem trying to replicate this other MWE, too.
Is there something wrong in my setup? How can I get this to work with HTML and not just PDF?
Edit: using mfrow
or otherwise messing with the graphics device itself isn't an option because the plotting function I'm using (filled.contour
) unfortunately takes over layout
.