View source: R/length_weight.R
length_weight_plot | R Documentation |
Reproduces Figure 2 of MEPS paper (for default values), showing how the same length bins translate to different body-mass bins for different species. Has not been fully tested with other input values (and some axis values etc are still hardwired).
length_weight_plot(
sp1 = "Common Ling",
sp2 = "Lemon Sole",
LWa = c(0.001, 0.0255),
LWb = c(3.4362, 2.7643),
col1 = c("red", "pink"),
col2 = c("blue", "lightblue"),
thick = 7,
curve_thick = 3,
length = 10:50,
lenBins = seq(10, 40, by = 5),
xlim = c(-6, 50),
ylim = c(-60, 800),
inset = c(0.1, -0.02),
xlab = "Length, cm",
ylab = "Body mass, g",
xaxs = "i",
yaxs = "i",
mgp = c(2, 0.5, 0),
lend = "butt"
)
sp1 |
Species 1 name (for legend) |
sp2 |
Species 2 name (for legend) |
LWa |
Vector of two alpha values (see MEPS equation 1), for species 1 then species 2 |
LWb |
Vector of two beta values (see MEPS equation 1), for species 1 then species 2 |
col1 |
Vector of two colours to alternate for species 1 |
col2 |
Vector of two colours to alternate for species 2 |
thick |
Thickness of bin segments |
curve_thick |
Thickness for curves |
length |
Sequence of length values to plot the length-weight relationships |
lenBins |
Example length bin breaks to show as examples |
xlim, ylim |
Limits for x and y axes |
inset |
Inset for the legend |
xlab, ylab |
Labes for x and y axes |
xaxs, yaxs, mgp, lend |
standard options for |
plots Figure, default is Figure 2 of MEPS
Andrew Edwards
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.