plot_spatial_membership {phyloregion}R Documentation

Visualize spatial memberships

Description

Visualize spatial memberships

Usage

plot_spatial_membership(
  omega,
  pol,
  radius = NULL,
  col = hcl.colors(5),
  pie_control = list(),
  legend = FALSE,
  legend_pie = FALSE,
  type = c("pie", "blend"),
  ...
)

Arguments

omega

a matrix of phyloregion of probabilities of each species

pol

a vector polygon of grid cells with a column labeled “grids”.

radius

Radius of the pie legend to be displayed

col

List of colors for the pies.

pie_control

The list of control parameters to be passed into the add.pie function.

legend

Logical, whether to plot a legend or not.

legend_pie

Legend for the pie plots.

type

Type of visualization, whether piecharts or blended colors.

...

Further arguments passed to or from other methods.

Value

Returns no value, just map color pies in geographic space!

Examples

library(terra)
data(africa)
p <- vect(system.file("ex/sa.json", package = "phyloregion"))
K <- ncol(africa$omega)

CLRS <- hcl.colors(K)
plot_spatial_membership(africa$omega, pol = p, col=CLRS, type="blend")

[Package phyloregion version 1.0.9 Index]