plot_catch_by_month: Create a plot of cumulative catches, with one panel for each...

View source: R/plot-catch-by-month.R

plot_catch_by_monthR Documentation

Create a plot of cumulative catches, with one panel for each fishery

Description

Create a plot of cumulative catches, with one panel for each fishery

Usage

plot_catch_by_month(
  catch_lst,
  names_lst,
  yrs = c((year(now()) - 4), (year(now()) - 1)),
  scale = 1000,
  type = c("catch", "proportion", "cumulative", "quota"),
  quota_lst = NULL,
  disclaimer_text = NULL,
  y_breaks = NULL,
  leg_pos = c(0.1, 0.7),
  leg_font_size = 8,
  line_width = ts_linewidth,
  line_gap = ts_linegap,
  point_shape = ts_pointshape,
  point_size = ts_pointsize,
  point_stroke = ts_pointstroke,
  title_font_size = axis_title_font_size,
  ax_title_x = axis_title_font_size,
  ax_title_y = axis_title_font_size,
  ax_text_x = axis_tick_font_size,
  ax_text_y = axis_tick_font_size
)

Arguments

catch_lst

A list of data tables with either three columns: month, year, and catch or 13 columns: Year, and one column each for the 12 months

names_lst

A list of names for the panel titles in the plot. Must be the same length as the catch_lst list

yrs

A vector of two years representing the maximum and minimum years to include in the data shown in the plot

scale

A number to divide the catch by

type

The type of plot, one of catch, proportion, cumulative, or quota

quota_lst

A list the same length as catch_lst and names_lst containing data frames which have two columns each, one named Year and one representing the sector quota for that year for which the name does not matter

disclaimer_text

Text to show in the empty panel at the bottom right of the plot grid. If NULL, Nothing will be shown there

y_breaks

A vector of y-axis values to show. The viewable part of the y-axis will also be set to the minimum to maximum of these values

leg_pos

A two-element vector describing the placement of the legend inside the plotting area where the x,y values are both between 0 and 1 or "none" for no legend

leg_font_size

The font size for the legend items

line_width

The width of the lines

line_gap

The gap between the points and lines (blank spacing)

point_shape

The point shape type

point_size

The size of the points

point_stroke

The stroke value for the points

title_font_size

Size of the title text for each panel

Value

A ggplot2::ggplot() object


pacific-hake/hake-assessment documentation built on Jan. 14, 2025, 9:12 p.m.