问题描述
id lat long category
1 -103.3671 43.0835 0 to 0.5
2 -103.3634 43.0855 0 to 0.5
3 -103.3684 43.0884 0.5 to 1
4 -103.3613 43.0835 1 to 1.5
我想知道如何在每个类别的传单图中以不同的颜色显示这些点?我一共有5个类别。
我尝试了类似的方法,但是没有成功:
pal <- colorNumeric(palette = "RdYlBu",domain = df$category)
leaflet(df) %>%
addCircles(lng = ~long,lat = ~lat,color = ~pal(category),fillColor = ~pal(category),fillOpacity = 0.7,radius = 10,stroke = FALSE)
在定义“朋友”时,出现错误:无法确定域范围。
对此有什么解决办法吗? 谢谢您的任何建议。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)