Skip to contents

ggplot of TESS results

Usage

tess_ggplot(
  krig_admix,
  coords = NULL,
  plot_method = "maxQ",
  ggplot_fill = algatr_col_default("ggplot"),
  minQ = 0.1,
  plot_axes = FALSE,
  rel_widths = c(3, 1),
  list = FALSE
)

Arguments

krig_admix

SpatRaster returned by tess_krig

coords

dataframe with x and y coordinates for plotting (optional)

plot_method

method for making rainbow map of kriged layers (options: "maxQ" to only plot the max Q value for each cell (default), "allQ" to plot all Q values greater than minQ, "maxQ_poly" or "allQ_poly" to create the plots as previously described, but as polygons for each K instead of continuous Q values)

ggplot_fill

any ggplot2 scale fill discrete function (default: scale_fill_viridis_d, option = "turbo")

minQ

threshold for minimum Q-value for rainbow plotting if plot_method = "allQ" or plot_method = "allQ_poly" is used (defaults to 0.10)

plot_axes

whether to plot axes or not (defaults to FALSE)

rel_widths

if plot_method = "maxQ" or plot_method = "allQ" is used, sets relative widths of kriged TESS map and legend (defaults to 3:1), from plot_grid

list

if plot_method = "maxQ" or "allQ", whether to output list of ggplots (i.e., the base plot and legend; TRUE) or a single plot (FALSE; default). Use list = TRUE if you would like to add additional ggplot2 functions to the plot

Value

ggplot object of TESS results