【发布时间】:2021-11-20 10:59:37
【问题描述】:
我对 R 还是很陌生,并试图让我的地图更漂亮。尽管互联网上有所有信息,但似乎没有任何东西可以解决我的问题。 当我绘制地图时,我仍然可以看到白线,我想增加点大小或以任何方式删除白线。我尝试了 cex 和其他图形参数,但除了图例的大小或标题之外没有任何变化。由于我刚刚开始使用空间绘图,因此很高兴接受进一步的改进建议!谢谢
par(mfrow=c(1,1), cex.lab=1.5,cex.axis=1.3, cex.main=1.5, mar=c(0,1.5,1.2,1.5))
int <- classIntervals(Large spatial polygon dataframe@data$X, n=15, style="quantile",precision=2)
colours <- findColours(int, palette, cutlabels=FALSE)
plot("Large spatial polygon dataframe", col=colours, border=rgb(0,0,0,0.05), las=1, lwd=0.25 ,lty=2,main="X", adj=0)
legend("bottomleft", legend=paste0("<",round(int$brks[-1],digits=0)), fill=palette, border=palette,
bty="n", title="", cex=1.3, y.intersp = 0.75)
data(wrld_simpl)
wrld_simpl.sp <- spTransform(wrld_simpl, "+proj=moll")
plot(wrld_simpl.sp,add=T)
【问题讨论】:
-
我强烈推荐使用包
ggplot2和ggspatial来创建空间图 -
你能分享一些我们可以使用的数据吗?
-
我尝试与 dput 共享一些数据,但惨遭失败 - 将再次尝试保存和共享一些数据,但现在我提供了数据头(希望这仍然有一点帮助)。抱歉,我习惯于使用普通数据框,但仍然对这个多边形数据框感到不知所措..
-
请提供足够的代码,以便其他人更好地理解或重现问题。
标签: r dictionary polygon spatial