stack.Coo: Family picture of shapes

View source: R/gr-Coo.R

stackR Documentation

Family picture of shapes

Description

Plots all the outlines, on the same graph, from a Coo (Out, Opn or Ldk) object.

Usage

## S3 method for class 'Coo'
stack(
  x,
  cols,
  borders,
  fac,
  palette = col_summer,
  coo_sample = 120,
  points = FALSE,
  first.point = TRUE,
  centroid = TRUE,
  ldk = TRUE,
  ldk_pch = 3,
  ldk_col = "#FF000055",
  ldk_cex = 0.5,
  ldk_links = FALSE,
  ldk_confell = FALSE,
  ldk_contour = FALSE,
  ldk_chull = FALSE,
  ldk_labels = FALSE,
  xy.axis = TRUE,
  title = substitute(x),
  ...
)

## S3 method for class 'Ldk'
stack(
  x,
  cols,
  borders,
  first.point = TRUE,
  centroid = TRUE,
  ldk = TRUE,
  ldk_pch = 20,
  ldk_col = col_alpha("#000000", 0.5),
  ldk_cex = 0.3,
  meanshape = FALSE,
  meanshape_col = "#FF0000",
  ldk_links = FALSE,
  ldk_confell = FALSE,
  ldk_contour = FALSE,
  ldk_chull = FALSE,
  ldk_labels = FALSE,
  slidings = TRUE,
  slidings_pch = "",
  xy.axis = TRUE,
  title = substitute(x),
  ...
)

Arguments

x

The Coo object to plot.

cols

A vector of colors for drawing the outlines. Either a single value or of length exactly equals to the number of coordinates.

borders

A vector of colors for drawing the borders. Either a single value or of length exactly equals to the number of coordinates.

fac

a factor within the $fac slot for colors

palette

a color palette to use when fac is provided

coo_sample

if not NULL the number of point per shape to display (to plot quickly)

points

logical whether to draw or not points

first.point

logical whether to draw or not the first point

centroid

logical whether to draw or not the centroid

ldk

logical. Whether to display landmarks (if any).

ldk_pch

pch for these landmarks

ldk_col

color for these landmarks

ldk_cex

cex for these landmarks

ldk_links

logical whether to draw links (of the mean shape)

ldk_confell

logical whether to draw conf ellipses

ldk_contour

logical whether to draw contour lines

ldk_chull

logical whether to draw convex hull

ldk_labels

logical whether to draw landmark labels

xy.axis

whether to draw or not the x and y axes

title

a title for the plot. The name of the Coo by default

...

further arguments to be passed to coo_plot

meanshape

logical whether to add meanshape related stuff (below)

meanshape_col

a color for everything meanshape

slidings

logical whether to draw slidings semi landmarks

slidings_pch

pch for semi landmarks

Value

a plot

See Also

Other Coo_graphics: inspect(), panel()

Examples


stack(bot)
bot.f <- efourier(bot, 12)
stack(bot.f)
stack(mosquito, borders='#1A1A1A22', first.point=FALSE)
stack(hearts)
stack(hearts, ldk=FALSE)
stack(hearts, borders='#1A1A1A22', ldk=TRUE, ldk_col=col_summer(4), ldk_pch=20)
stack(hearts, fac="aut", palette=col_sari)

chaffal <- fgProcrustes(chaff)
stack(chaffal, slidings=FALSE)
stack(chaffal, meanshape=TRUE, meanshape_col="blue")


vbonhomme/Momocs documentation built on Nov. 13, 2023, 8:54 p.m.