Learn R Programming

ypr (version 0.4.0)

ypr_plot_fish: Plot Fish

Description

Produces a frequency histogram of the number of fish in the 'Survivors', 'Spawners', 'Caught', 'Harvested' or 'Released' categories by 'Length', 'Age' or 'Weight' class.

Usage

ypr_plot_fish(
  population,
  x = "Age",
  y = "Survivors",
  percent = FALSE,
  binwidth = 1L,
  color = NULL
)

Arguments

population

An object of class ypr_population().

x

A string of the term on the x-axis.

y

A string of the term on the y-axis.

percent

A flag specifying whether to plot the number of fish as a percent or frequency (the default).

binwidth

A positive integer of the width of the bins for grouping.

color

A string of the color around each bar (or NULL).

Value

A ggplot2 object.

See Also

ypr_population() and ggplot2::geom_histogram()

Examples

Run this code
# NOT RUN {
ypr_plot_fish(ypr_population(), color = "white")
# }

Run the code above in your browser using DataLab