View source: R/plot-catch-by-month.R
plot_catch_by_month | R Documentation |
Create a plot of cumulative catches, with one panel for each fishery
plot_catch_by_month(
catch_lst,
names_lst,
yrs = c((year(now()) - 4), (year(now()) - 1)),
scale = 1000,
type = c("catch", "proportion", "cumulative", "quota"),
quota_lst = NULL,
disclaimer_text = NULL,
y_breaks = NULL,
leg_pos = c(0.1, 0.7),
leg_font_size = 8,
line_width = ts_linewidth,
line_gap = ts_linegap,
point_shape = ts_pointshape,
point_size = ts_pointsize,
point_stroke = ts_pointstroke,
title_font_size = axis_title_font_size,
ax_title_x = axis_title_font_size,
ax_title_y = axis_title_font_size,
ax_text_x = axis_tick_font_size,
ax_text_y = axis_tick_font_size
)
catch_lst |
A list of data tables with either three columns: month, year, and catch or 13 columns: Year, and one column each for the 12 months |
names_lst |
A list of names for the panel titles in the plot. Must be
the same length as the |
yrs |
A vector of two years representing the maximum and minimum years to include in the data shown in the plot |
scale |
A number to divide the catch by |
type |
The type of plot, one of |
quota_lst |
A list the same length as |
disclaimer_text |
Text to show in the empty panel at the bottom
right of the plot grid. If |
y_breaks |
A vector of y-axis values to show. The viewable part of the y-axis will also be set to the minimum to maximum of these values |
leg_pos |
A two-element vector describing the placement of the legend inside the plotting area where the x,y values are both between 0 and 1 or "none" for no legend |
leg_font_size |
The font size for the legend items |
line_width |
The width of the lines |
line_gap |
The gap between the points and lines (blank spacing) |
point_shape |
The point shape type |
point_size |
The size of the points |
point_stroke |
The stroke value for the points |
title_font_size |
Size of the title text for each panel |
A ggplot2::ggplot()
object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.