plot_count {wingen}R Documentation

Plot moving window map of sample counts

Description

Plot sample counts layer produced by window_gd or krig_gd

Usage

plot_count(
  x,
  index = NULL,
  breaks = 100,
  col = viridis::mako(breaks),
  main = NULL,
  box = FALSE,
  range = NULL,
  legend = TRUE,
  ...
)

Arguments

x

single SpatRaster of counts or SpatRaster where indexed layer is sample counts

index

if a raster stack is provided, index of the sample count layer to plot (defaults to plotting the layer named "sample_count" or the last layer of the stack)

breaks

number of breaks to use in color scale (defaults to 10)

col

color palette to use for plotting (defaults to viridis::magma palette)

main

character. Main plot titles (one for each layer to be plotted). You can use arguments cex.main, font.main, col.main to change the appearance; and loc.main to change the location of the main title (either two coordinates, or a character value such as "topleft")

box

whether to include a box around the raster plot (defaults to FALSE)

range

numeric. minimum and maximum values to be used for the continuous legend

legend

whether to include legend

...

arguments passed to plot("SpatRaster", "numeric") and additional graphical arguments

Value

plot of sample counts

Examples

data("mini_lyr")
plot_count(mini_lyr)

[Package wingen version 2.1.1 Index]