Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
R新手在这里。
如果我第一次使用map('state'),我该如何使用map('county', ylim=..., xlim=...)但像这样抵消它:
map('state')
map('county', ylim=..., xlim=...)
现在,我正在使用 imagemagickcomposite -gravity southwest ...来组合 2 个 PNG 文件,但这似乎不太理想。
composite -gravity southwest ...
您可以fig在图形参数调用中使用该选项来设置将要绘制图形的区域。
fig
map("state") par(fig=c(0.1,0.9,0,0.6), new=TRUE, xpd=NA) map("county",regions="california",add=TRUE)
关于其他代码,xpd=NA允许您在绘图的边缘绘图,同时new=TRUE确保在开始新绘图时不会废弃现有绘图。添加add=TRUE到该县的情节末尾的行为与new=TRUE调用类似。
xpd=NA
new=TRUE
add=TRUE