plot_depths: Plot depth boxplots by year (catchdate) or histograms for a...

Description Usage Arguments Value

View source: R/plot-data.R

Description

Plot depth boxplots by year (catchdate) or histograms for a single year

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
plot_depths(
  d,
  plot_type = "hist",
  depth_type = "bottom",
  fishery_type = NA,
  depth_max = 1500,
  bin_width = 10,
  xlim = c(NA, NA),
  ylim = c(NA, NA),
  alpha = 0.6,
  show_legend = FALSE,
  legend_loc = "inside"
)

Arguments

d

The data frame as returned by the spatial SQL queries found in this in the variable spatial_catch_sql_file

plot_type

Type of plot, one of 'hist' or 'box'

depth_type

Type of depth to plot: 'bottom' or 'gear'.

fishery_type

One of NA, 'ft', 'ss', or 'jv'. If NA, all fisheries will be plotted against one another, if one of the others, that will be filtered before plotting

depth_max

Maximum depth. Remove records with depth greater than this. IF NA, no restrictions will be placed on the depth.

bin_width

See ggplot2::geom_histogram()

xlim

Limits for the x-axis. For c(NA, NA), plot will extend to limits of data

alpha

Transparency of fill from 0 - 1

show_legend

Logical for inclusion of legend

legend_loc

Where to place legend "inside" or "outside" the frame of the plot

Value

A ggplot2 object


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