plot_depth: Create a boxplot of depths for a given data frame

View source: R/plot-depth.R

plot_depthR Documentation

Create a boxplot of depths for a given data frame

Description

Create a boxplot of depths for a given data frame

Usage

plot_depth(
  depth_df,
  yrs,
  title_text = NULL,
  line_col = "grey",
  box_width = 0.75,
  y_lim = NULL,
  y_breaks = NULL,
  reverse_y = TRUE,
  ...
)

Arguments

depth_df

A data frame containing boxplot input, see files like ⁠depth-us-*.csv⁠

yrs

A vector of the years to show in the plot

title_text

The title to show. If NULL, do not show the title

line_col

The color of the median line and box outline

box_width

With of each box

y_lim

The vector of two value representing the y-limits for the plot

y_breaks

The vector of y-axis values to show on the plot

reverse_y

Logical. If TRUE, place the zero on top of the y-axis and the depths in reverse order downward, to mirror the water column layout in the real world

Value

A ggplot2::ggplot() object


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