View source: R/plot-weight-at-age.R
plot_weight_at_age | R Documentation |
Create a plot of weight-at-age lines by age and year
plot_weight_at_age(
wa,
ages = NULL,
bold_ages = NULL,
cols = c("purple", "darkblue", "yellow", "darkgreen"),
x_lim = c(start_yr_age_comps, last_data_yr),
y_lim = c(0, 2),
y_labs_by = 0.25,
x_labels_mod = 5,
x_labs_mod = 5,
tick_prop = 1,
vjust_x_labels = -1.5,
remove_yr_labels = NULL,
age_label_font_size = 4,
age_label_side = "right",
...
)
wa |
A data frame of weight-at-age with a |
ages |
A vector of ages to plot. If |
bold_ages |
A vector of ages to make bold in the plot. The lines for these ages will be thicker and the labels for them will be bold as well |
cols |
A vector of colors to base the color ramp on. See
|
x_lim |
The min and max limits as a vector for the x-axis |
y_lim |
The min and max limits as a vector for the y-axis |
x_labels_mod |
Show every nth year where n is this number |
x_labs_mod |
How many years between year labels on the x-axis |
tick_prop |
A value that the length of the major tick marks are
multiplied by. This proportion must be set by trial and error. Make sure
to change |
vjust_x_labels |
Adjustment to move the x-axis tick labels and label up or down. Negative numbers move down |
remove_yr_labels |
A vector of years to remove the ,labels for in case they are overlapping |
age_label_font_size |
The font size for the labels pointing to the age lines |
age_label_side |
Where to place the age labels next to the lines. One of "none", "both", "left", or "right" |
... |
Arguments passed to |
y_lab_by |
The amount between each y-axis label |
A ggplot2::ggplot()
object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.