Closed marine-ecologist closed 3 months ago
Reproducible example below:
library(sf) library(tmap) library(leaflet) library(leaflet.extras) particles <- st_as_sf(data.frame( id = 1:1000, x = runif(1000, 4, 5), y = runif(1000, 4.8, 5.8), z = runif(1000, 0, 100) ), coords = c("x", "y"), crs = 4326) tmap_mode("view") tmp <- tm_shape(particles, name="Z levels") + tm_symbols(size=0.5, shp=21, fill="z", fill.scale = tmap::tm_scale_continuous(values="reds"), fill.legend = tmap::tm_legend(name = "Z levels")) tmp
Nice find, thx! Working now.
Reproducible example below: