1
R版本3.2.3如何在地图上显示点的图例(比例尺颜色)?
library(OpenStreetMap)
map <- openmap(c(lat= 48, lon= 3), c(lat= 40, lon= 0))
map <- openproj(map)
plot(map)
lon=c(1, 03, 04, 08, -1)
lat=c(40, 41, 41, 42, 41)
x=c(1, 3, 0.1, 2, 1) #I give here example of only 5 values but my real values are many and vary. So the values here are not discrete but continuous!
points(lon,lat,pch=19,col=x) #not sure here how
我想绘制从蓝色到红色,最重要的展会规模颜色(传说)地图旁的色彩范围在地图上x的这些点。
@temor看看[单张R](https://rstudio.github.io/leaflet/),特别是[legents](https://rstudio.github.io/leaflet/legends.html)页面和[光栅图像]页面(https://rstudio.github.io/leaflet/raster.html)页面 – SymbolixAU
@temor看着[错误消息](https://github.com/rstudio/leaflet/blob/master/R/colors.R),它表明你的范围内有一些“无限”的值。什么是'df $ t [!is.finite(df $ t)]'? – SymbolixAU
我解决它,因为“”但我仍然有传奇的大小问题 – temor