View source: R/wcvp_distribution_map.R
wcvp_distribution_map | R Documentation |
Plot distribution maps for species, genera or families
wcvp_distribution_map( range, crop_map = FALSE, native = TRUE, introduced = TRUE, extinct = TRUE, location_doubtful = TRUE )
range |
Simple features ( |
crop_map |
Logical. Crop map extent to distribution? Defaults to |
native |
Logical. Include native range? Defaults to |
introduced |
Logical. Include introduced range? Defaults to |
extinct |
Logical. Include extinct range? Defaults to |
location_doubtful |
Logical. Include occurrences that are thought to be
doubtful? Defaults to |
The colour scheme mirrors that used by Plants of the World (POWO; https://powo.science.kew.org/), where green is native, purple is introduced, red is extinct and orange is doubtful. See Examples for how to use custom colours.
A ggplot2::ggplot
of the distribution.
# these examples require 'rWCVPdata' if(requireNamespace("rWCVPdata")){ p <- wcvp_distribution_map(wcvp_distribution("Callitris", taxon_rank = "genus")) p # now only the native range, and cropped to range extent p <- wcvp_distribution_map(wcvp_distribution("Callitris", taxon_rank = "genus"), introduced = FALSE, crop_map = TRUE ) p # now with different colours # note that this taxon only has native and introduced occurrences, so only two colours are needed p <- wcvp_distribution_map(wcvp_distribution("Callitris", taxon_rank = "genus")) p + # for polygons ggplot2::scale_fill_manual(values = c("red", "blue")) + # for points (islands) ggplot2::scale_colour_manual(values = c("red", "blue")) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.