Open LTLA opened 5 years ago
This behaviour is because BiocStyle automatically crops images, so the two columns of white space are removed. Perhaps it shouldn't do that if par()
has been changed from the default values?
You can stop the behaviour by setting crop = NULL
in the code chunk options e.g.
```{r, fig.wide=TRUE, fig.asp=1/3, crop=NULL}
par(mfrow=c(1,3), mar=c(5.1, 4.1, 4.1, 2.1))
for (i in 1:10) {
plot(1,i)
}
gets me
<p align="center">
<img src="https://user-images.githubusercontent.com/971237/68663292-b0c47e00-053e-11ea-8c2a-bf54f550ac61.png" height=500></p>
Thanks, it wasn't obvious that crop=FALSE
was an option. This seems like a divergence from knitr defaults, so perhaps that should be mentioned somewhere in the documentation; certainly it would eliminate questions like this one.
Consider the following:
R version 3.6.0 Patched (2019-05-10 r76483) Platform: x86_64-apple-darwin17.7.0 (64-bit) Running under: macOS High Sierra 10.13.6
Matrix products: default BLAS: /Users/luna/Software/R/R-3-6-branch-dev/lib/libRblas.dylib LAPACK: /Users/luna/Software/R/R-3-6-branch-dev/lib/libRlapack.dylib
locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] BiocStyle_2.13.2
loaded via a namespace (and not attached): [1] BiocManager_1.30.4 compiler_3.6.0 bookdown_0.11 magrittr_1.5 [5] tools_3.6.0 htmltools_0.3.6 yaml_2.2.0 Rcpp_1.0.1 [9] stringi_1.4.3 rmarkdown_1.13 knitr_1.23 stringr_1.4.0 [13] xfun_0.8 digest_0.6.20 evaluate_0.14