library(maptools)
data(wrld_simpl)
plot(wrld_simpl)
box()
Run Code Online (Sandbox Code Playgroud)
这给了我一张世界地图,并显示了地图顶部和底部的丰富空白区域.我希望这个空间消失,因为我需要打印许多(~60)地图.我正在使用knitr嵌入地图的报告.例如
Here is some text.
<<chunk.maps, eval = TRUE>>=
library(maptools)
plot(wrld_simpl)
box()
@
And some more text.
Run Code Online (Sandbox Code Playgroud)
但我认为这不是一个knitr问题.所以:
我已经试过mai,mar,par,但没有这样的运气!我猜测out.widthchunk选项会给出我的问题2的结果,但由于我在问题1上如此严重,我觉得很难说.
非常感谢你!这里有很多值得学习的地方!