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

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.