Learn R Programming

phyloregion (version 1.0.2)

plot_evoldistinct: Visualize biogeographic patterns

Description

Visualize biogeographic patterns

Usage

plot_evoldistinct(
  x,
  palette = "YlOrBr",
  pos = "bottomleft",
  key_label = "",
  legend = TRUE,
  leg = 5,
  lwd = 15,
  ...
)

# S3 method for phyloregion plot(x, shp = NULL, palette = "YlOrBr", ...)

plot_NMDS(x, ...)

text_NMDS(x, ...)

Arguments

x

an object of class phyloregion from phyloregion

palette

name of the palette to generate colors from. The name is matched to the list of available color palettes from the hcl.colors function in the grDevices package.

pos

location to position the legend such as “bottomright”, “bottomleft”, “topleft”, and “topright”.

key_label

label for the color key

legend

logical indicating whether to add a legend to the map.

leg

parameter of the color key.

lwd

parameter of the color key.

arguments passed among methods.

shp

a polygon shapefile of grid cells.

Value

No return value, called for plotting.

Examples

Run this code
# NOT RUN {
data(africa)
tree <- africa$phylo
x <- africa$comm

subphy <- match_phylo_comm(tree, x)$phy
submat <- match_phylo_comm(tree, x)$com

pbc <- phylobeta(submat, subphy)
y <- phyloregion(pbc[[1]], shp=africa$polys)

plot_NMDS(y, cex=6)
text_NMDS(y, cex=2)
plot(y, cex=1, palette="NMDS")
plot(y, cex=1)
plot_evoldistinct(y)
# }

Run the code above in your browser using DataLab