data(africa)
x <- EDGE(africa$IUCN, africa$phylo, Redlist = "IUCN", species="Species")
y <- map_trait(africa$comm, x, FUN = sd, shp=africa$polys)
plot_swatch(y, y$traits,
col = hcl.colors(n=20, palette = "Blue-Red 3", rev=FALSE))
Run the code above in your browser using DataLab