Visualize biogeographic patterns using pie charts

plot_pie(
  omega,
  pol,
  radius = 0.55,
  col = hcl.colors(5),
  pie_control = list(),
  legend = FALSE,
  legend_pie = FALSE,
  ...
)

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.

...

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_pie(africa$omega, pol = p, col=CLRS)