plot(tamiasEPM, use_tmap = FALSE)
plot(tamiasEPM, legend = FALSE, use_tmap = FALSE, col = viridisLite::inferno)
addLegend(tamiasEPM, location = 'top', ramp = viridisLite::inferno)
# \donttest{
# Example for how to plot multiple epmGrids on the same color scale
# for illustration purposes, we will compare weighted endemism to
# phylogenetic weighted endemism
library(tmap)
tamiasEPM <- addPhylo(tamiasEPM, tamiasTree)
epm1 <- gridMetrics(tamiasEPM, metric='weightedEndemism')
epm2 <- gridMetrics(tamiasEPM, metric='phyloWeightedEndemism')
# get global min and max values
minmax <- getMultiMapRamp(epm1, epm2)
map1 <- plot(epm1, colorRampRange = log(minmax), log = TRUE, legend = FALSE)
map2 <- plot(epm2, colorRampRange = log(minmax), log = TRUE, legend = FALSE)
# tmap_arrange(map1, map2)
# view your plot in the web-browser as a dynamic plot.
plot(tamiasEPM, basemap = 'interactive')
# }
# Adding a custom legend, and passing along arguments via params
xx <- plot(tamiasEPM, use_tmap = FALSE, legend = FALSE,
col = viridisLite::magma)
addLegend(tamiasEPM, params = xx, location = 'bottom')
Run the code above in your browser using DataLab