plot_population_grid: Plot the constructed population grid

Description Usage Arguments See Also Examples

Description

Given an EEMS output directory, this function generates one figure to visualize the EEMS population grid. All edges are shown in the same color to visualize the grid before estimating the migration and diversity rates. This can be helpful if EEMS throws the error "The population grid is not connected."

Usage

1
2
plot_population_grid(mcmcpath, longlat, add_demes = FALSE,
  col_demes = "black", col_outline = "black", col_grid = "gray50")

Arguments

mcmcpath

A vector of EEMS output directories, for the same dataset. Warning: There is minimal checking that the directories all correspond to the same dataset.

longlat

A logical value indicating whether the coordinates are given as pairs (longitude, latitude) or (latitude, longitude).

add_demes

A logical value indicating whether to add the observed demes or not.

col_demes

The color of the demes. Defaults to black.

col_outline

The color of the habitat outline. Defaults to white.

col_grid

The color of the population grid. Defaults to gray.

See Also

make_eems_plots, plot_resid_heatmap, plot_voronoi_tiles

Examples

1
2
3
4
5
6
7
8
9
# Use the provided example or supply the path to your own EEMS run
mcmcpath <- system.file("extdata", "EEMS-example", package = "reemsplots2")
plots <- plot_population_grid(mcmcpath, longlat = TRUE)
plots

# An interesting example where the habitat has an unusual shape and the grid is unconnected
mcmcpath <- system.file("extdata", "EEMS-popgrid", package = "reemsplots2")
plots <- plot_population_grid(mcmcpath, longlat = FALSE)
plots

dipetkov/reemsplots2 documentation built on May 15, 2019, 8:47 a.m.