View source: R/visualize_phyloregions.R
plot.phyloregion | R Documentation |
Visualize biogeographic patterns
## S3 method for class 'phyloregion'
plot(x, pol = NULL, palette = "NMDS", col = NULL, label = FALSE, ...)
plot_NMDS(x, ...)
text_NMDS(x, ...)
x |
an object of class phyloregion from |
pol |
a polygon shapefile of grid cells. |
palette |
name of the palette to generate colors from. The default,
“NMDS”, allows display of phyloregions in multidimensional
scaling color space matching the color vision of the human visual
system. The name is matched to the list of available color palettes from
the |
col |
vector of colors of length equal to the number of phyloregions. |
label |
Logical, whether to print cluster names or not |
... |
arguments passed among methods. |
No return value, called for plotting.
library(terra)
data(africa)
tree <- africa$phylo
x <- africa$comm
p <- vect(system.file("ex/sa.json", package = "phyloregion"))
subphy <- match_phylo_comm(tree, x)$phy
submat <- match_phylo_comm(tree, x)$com
pbc <- phylobeta(submat, subphy)
y <- phyloregion(pbc[[1]], pol=p)
plot_NMDS(y, cex=6)
text_NMDS(y, cex=2)
plot(y, cex=1, palette="NMDS")
plot(y, cex=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.