map <- terra::rast(matrix(runif(400, 0, 1),
nrow = 20,
ncol = 20))
plotPA(map,
th = 0.8)
# Custom colors
plotPA(map,
th = 0.5,
colors = c("#d8b365", "#018571"))
if (FALSE) {
# Save the file. The following command will save the map in the working
# directory. Note that `filename` must include the extension.
plotPA(map,
th = 0.7,
filename = "my_map.tif")}
Run the code above in your browser using DataLab