使用自动图例(比例尺)为该地图绘制。需要进行两次调整。一:图例应为水平(位置右下)。二:图例文字颜色应为白色。调查了几篇文章,但找不到答案。仅用于定义图例。
png("PLOTS/snowalert_today_0.png", width = 1000, height = 550, res=72, bg = 'transparent')
plot(nnmsk, axes=FALSE, box=FALSE,
col = colorRampPalette(c("transparent","#4A9EE7","#1A6AB4", "#F3970D", "#FD5602","#C20011"))(500))
points(dfpoi$Longitude, dfpoi$Latitude, col = "transparent", cex = .4)
text(x=dfpoi$Longitude,y=dfpoi$Latitude,labels=dfpoi$resort, cex=0.7, font=1,pos=4,col="#2d2d2d")
par(mar=c(0, 0, 0, 0))
dev.off()