smr_x_axis: Custom x-axis for IEP Seasonal Monitoring Report figures

Description Usage Arguments Value

View source: R/plot_tools.R

Description

Standardizes the x-axis limits and breaks of a ggplot.

Usage

1
2
3
4
5
6
7
smr_x_axis(
  report_year,
  type = c("all", "recent"),
  season = c("annual", "winter", "spring", "summer", "fall"),
  interval,
  start_year
)

Arguments

report_year

The user-defined report year for the Seasonal Monitoring Report. Must be an integer.

type

The scale type to use. type = "all" defines the minimum x-axis limit as 1966, which corresponds to the earliest survey shown in the fall season report (Fall Midwater Trawl). type = "recent" defines the minimum x-axis limit as 2004, which corresponds to the Pelagic Organism Decline.

season

The season for the Seasonal Monitoring Report. Must be one of the following: "winter", "spring", "summer", "fall", or "annual".

interval

(optional) override the x-axis break interval. By default, type = "all" results in a break interval of 10 years while type = "recent" results in a break interval of 5 years.

start_year

(optional) override the x-axis lower limit.

Value

A ggplot continuous x-axis scale.


InteragencyEcologicalProgram/smonitr documentation built on Nov. 9, 2020, 7:01 a.m.