ggplot_gd: Plot moving window map of genetic diversity
Description
Plot genetic diversity layer produced by window_gd or krig_gd
Usage
ggplot_gd(x, bkg = NULL, index = NULL, col = viridis::magma(100))
Arguments
- x
output from window_gd or krig_gd (RasterStack where first layer is genetic diversity)
- bkg
optional raster or sf polygon
- index
index of raster layers to plot (defaults to plotting all of the layers except the one called "sample_count", if more than one layer is provided)
- col
color palette to use for plotting (defaults to magma palette)
Examples
Run this codedata("mini_lyr")
ggplot_gd(mini_lyr)
Run the code above in your browser using DataLab