Skip to contents

Plot catch-per-unit-effort (CPUE) data across all years and by year and save them to the disk. Figures are created using ggplot2.

Usage

plot_cpue_map(data, dir = NULL, main = NULL, plot = 1:2)

Arguments

data

A dataframe of catch data created by pull_catch().

dir

Directory where output will be saved. The directory where the file should be saved. If dir = NULL no output will be saved.

main

A string that will be prepended to the name of the saved png (i.e., "NWFSC" results in a file called "NWFSC_CPUE_Map.png").

plot

A vector of integers to specify which plots you would like. The default is to print both figures.

  1. coastwide data across all years

  2. coastwide data by year

Value

Figures are saved to the disk according to which plots are asked for in plot. Each of the specified files are saved to dir, the specified directory. No objects are returned to the user. But, the figures are printed to new windows if they are not saved to the disk.

Author

Chantel R. Wetzel

Examples

if (FALSE) { # \dontrun{
plot_cpue_map(data = catch_nwfsc_combo, plot = 1)
plot_cpue_map(data = catch_nwfsc_combo, plot = 2)
} # }