With following chunk the left alignment doesn’t work. The resulting map has still the same left border as without fig.align='left'
\documentclass[a4paper, oneside, british]{book}
\begin{document}
<<chunk.maps, fig.height=12, fig.width=21, out.width="6in", fig.align='left'>>=
library(knitr)
library(maptools)
data(wrld_simpl)
plot(wrld_simpl)
box()
@
\end{document}
I would greatly appreciate any help with this!
Thanks,
Gerit
It is not because
fig.align="left"does not work; as @joran said in the comments, it does work if you make the plot smaller. There are two problems that caused the artifact:par(mar)is not 0 on the left margin by default; see?par; setpar(mar = c(0, 0, 0, 0))solves this problem\parindent)To make the plot touch the left margin, try this:
If you are uncomfortable with setting
\parindentto 0, you can restore it after the chunk.