plot_spatial: Spatial plot of data by block

Description Usage Arguments Value

View source: R/plot-data.R

Description

Spatial plot of data by block

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
plot_spatial(
  grd,
  data_col = "num_fids",
  data_factor = 1,
  crs = 4326,
  extents = data.frame(lon = c(-135, -122), lat = c(48, 55)),
  contour_depths = c(100, 200, 400, 1000, 1500, 2000),
  contour_color = "lightblue",
  contour_thickness = 0.25
)

Arguments

grd

A list of length 2, the output of the make_grid() function

data_col

The column in the grd data frame to use as the plotting value

data_factor

Value to divide the data_col values by in the grd data frame

crs

See contours_as_sfg()

extents

A data frame with two columns, named 'lon' and 'lat' which represent the extents of the plotting area. The data frame must have two rows and two columns

contour_depths

A vector of depths to plot. Must be already present in the contour data (bc_bathymetry). If NA, no contours will be plotted

contour_color

Color for the contour lines

contour_thickness

Thickness of contour lines

Value

A ggplot object


pbs-assess/hakedata documentation built on Jan. 16, 2021, 9:15 p.m.