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