plot.regions_pco {MorphoRegions} | R Documentation |
Plot PCO axes
Description
plot()
visualizes the relationship between a PCO axis and the vertebra or between pairs of PCO axes.
Usage
## S3 method for class 'regions_pco'
plot(x, pco_y = 1, pco_x = NULL, ...)
Arguments
x |
a |
pco_y , pco_x |
number; PCO score indices for the y- and x-axes, respectively. |
... |
arguments passed to |
Details
When pco_x
is NULL
(the default), plot()
will display a scatterplot of the PCO axis identified by pco_y
and vertebra position using ggplot2::geom_point()
. This plot is similar to that generated by plotsegreg()
. Otherwise, plot()
uses ggplot2::geom_text()
to identify vertebrae positions in the space corresponding to the requested PCOs.
Value
A ggplot
object.
See Also
svdPCO()
for generating the PCO scores. plot.regions_sim()
for plotting PCO scores against vertebra position for simulated PCOs. plotsegreg()
for plotting PCO scores against vertebra position after selecting breakpoints for a segmented regression.
Examples
data("alligator")
alligator_data <- process_measurements(alligator,
pos = "Vertebra")
# Compute PCOs
alligator_PCO <- svdPCO(alligator_data,
metric = "gower")
alligator_PCO
# Plot PCOs against vertebra index
plot(alligator_PCO, pco_y = 1:2)
# Plot PCOs against each other
plot(alligator_PCO, pco_y = 1, pco_x = 2)