Description Usage Arguments Details Warning Author(s) References See Also Examples
Displays the SDA line fitted by calcSDA
on top of a plot of MO2 vs
time. Also displayed is coloured representation of the magnitude of SDA (the
area between the fitted line and the horizontal line representing SMR) and
the values of peak, time-to-peak, duration and magnitude.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | plotSDA(
my.sda,
show.par = T,
show.var = T,
show.smr.line = T,
show.feeding = T,
show.mag.arrow = T,
peak.lab.pos = NULL,
mag.lab.pos = NULL,
smr.lab.pos = c("2L", "1L", "none"),
lty.smr = 1,
col.smr = "orange",
lty.feeding = 1,
col.feeding = "seagreen",
Cex.par = 0.8,
Cex.sda = 0.9,
col.sda = rgb(1, 0, 0, 0.2),
...
)
|
my.sda |
Object created by |
show.par |
Boolean, if |
show.var |
Boolean, if |
show.smr.line |
Boolean, |
show.feeding |
Boolean, |
show.mag.arrow |
Boolean, |
peak.lab.pos |
If NULL, the function tries to calculate a position for the label associated with the peak of SDA. A (x, y) pair can be provided if the calculated position is inadequate. |
mag.lab.pos |
If NULL, the function tries to calculate a position for the label associated with the magnitude of SDA. A (x, y) pair can be provided if the calculated position is inadequate. |
smr.lab.pos |
Although a horizontal line depicting SMR is shown, the
value of SMR is only shown if requested, either in one string below SMR
( |
lty.smr |
Line type for SMR, same meaning as |
col.smr |
Colour of the horizontal line representing SMR. |
lty.feeding |
Line type for time of feeding, same meaning as |
col.feeding |
Colour of the vertical line representing feeding time. |
Cex.par |
Size of the text for tau and lambda. Same use as |
Cex.sda |
Size of the text for the SDA parameters. Same use as
|
col.sda |
Colour of the shading representing SDA magnitude. |
... |
Other graphics parameters may work. |
Add SDA details to an existing plot of MO2 x time.
The automatic positioning of SMR and of the SDA parameters
works best when plots have a longer X axis than Y axis. On square plots
you will probably have to position these labels yourself using the
arguments peak.lab.pos
and mag.lab.pos
. On plots showing
data before and after feeding, the space to draw an arrow associated with
magnitude (show.mag.arrow
) is restricted and the result is often
unattractive, it may be necessary to set this argument to FALSE
.
Denis Chabot, Institut Maurice-Lamontagne, Department of Fisheries and Oceans.
Chabot, Denis, Koenker, Roger and Farrell, Anthony P. (2016) The measurement of the specific dynamic action in fishes. Journal of Fish Biology 88, 152-172.
Chabot, Denis, Steffensen, John F. and Farrell, Anthony P. (2016) The determination of the standard metabolic rate in fishes. Journal of Fish Biology 88, 81-121.
Koenker, Roger (2005) Quantile regression. Cambridge University Press, Cambridge. 366 p.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | data("codSDA")
sda.data = subset(codSDA, r2 >= 0.96)
# Logtime_hr is time in hours relative to time of feeding, a required variable.
# MO2cor is in micromoles per min per kg and the "cor" in the name means that
# the MO2 values soon after feeding were corrected for the effect of the
# feeding procedure
SDA= calcSDA(X=sda.data$Logtime_hr, Y=sda.data$MO2cor, my.smr=81.2,
tau=0.2, lambda=30,
postfeed.acclim=3, tol=0.05, tol.type="proportion",
MO2.time.unit="min", X.time.unit="hour")
par(mar=c(4, 4, 0.1, 0.1)+0.1, mgp=c(1.8,0.5,0))
plotMO2(sda.data$Logtime_hr, sda.data$MO2cor, mo2="dotital", o2="umol", t="min", m="kg",
showO2 = FALSE, Xlab = "Time relative to feeding (hr)", ylim=c(50, 250))
plotSDA(SDA)
# not enough space to show the arrow associated with magnitude, better to hide it
plotMO2(sda.data$Logtime_hr, sda.data$MO2cor, mo2="dotital", o2="umol", t="min", m="kg",
showO2 = FALSE, Xlab = "Time relative to feeding (hr)", ylim=c(50, 250))
plotSDA(SDA, show.mag.arrow=FALSE)
# same data, but focus on post-feeding data and the SDA
plotMO2(sda.data$Logtime_hr, sda.data$MO2cor, mo2="dotital", o2="umol", t="min", m="kg",
showO2 = FALSE, Xlab = "Time relative to feeding (hr)", ylim=c(50, 250), xlim=c(0,100))
plotSDA(SDA, smr.lab.pos="1L")
# SMR label is illegible, better not to display it
# Default position for peak not great, force a new position
plotMO2(sda.data$Logtime_hr, sda.data$MO2cor, mo2="dotital", o2="umol", t="min", m="kg",
showO2 = FALSE, Xlab = "Time relative to feeding (hr)", ylim=c(50, 250), xlim=c(0,100))
plotSDA(SDA, smr.lab.pos="none", peak.lab.pos=c(40,150))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.