Learn R Programming

Momocs (version 0.2-6)

coo.oscillo: Momocs' "oscilloscope" for periodic functions.

Description

Shape analysis deals with curve fitting, whether $x(t)$ and $y(t)$ positions along the curvilinear abscissa or radius/tangent angle variation. We may need to represent these single or double periodic functions that are ajusted by Fourier-based method. coo.oscillo and coo.oscillo1 compute and provide standardized plot when given a matrix of coordinates or a vector, respectively. These functions are mainly used for development purpose but are included in the package.

Usage

coo.oscillo(coo, method = c("d0", "di")[1], plot = TRUE, rug = TRUE, 
    legend = TRUE, cols = col.gallus(2), ref=FALSE, ref.nb=8, ...) 

coo.oscillo1(coo, method = c("d0", "di")[1], plot = TRUE, rug = TRUE, 
    legend = TRUE, cols = col.gallus(1), 
    xlab = "Points sampled along the outline",  ylab = "Deviation", ...)

Arguments

coo
A list or a matrix of coordinates.
method
character. Whether to calculate differences with the first point ("d0") or the previous ("di"), ie the derivate.
plot
Whether to plot the results.
rug
logical. Whether to display a pseudo rug, that indicate if the derivate is positive.
legend
logical. Whether to add a legend.
cols
A vector of two (for coo.oscillo) or a single (coo.oscillo1) color for lines.
ref
logical. Whether to display the original shape besides the oscillo.
ref.nb
integer. The number or reference points, sampled equidistantly along the curvilinear abscissa and added on the oscillo curves.
xlab
character. Alternate label for x-axis.
ylab
character. Alternate label for y-axis.
...
Additional parameters than can be passed to lines.

Value

  • Returns a list with two or one component(s), giving the difference calculated.

Examples

Run this code
data(bot)
coo.oscillo(bot@coo[[1]], lty=2)
coo.oscillo1(tfourier(bot@coo[[1]], 24)$phi)

Run the code above in your browser using DataLab