plot_MSHAPES: Pairwise comparison of a list of shapes

View source: R/gr-MSHAPES.R

plot_MSHAPESR Documentation

Pairwise comparison of a list of shapes

Description

"Confusion matrix" of a list of shapes. See examples.

Usage

plot_MSHAPES(x, draw_fun, size, palette)

Arguments

x

a list of shapes (eg as returned by MSHAPES)

draw_fun

one of draw_outline, draw_curves, draw_landmarks. When the result of MSHAPES is passed, detected based on ⁠$Coe⁠, otherwise default to draw_curves.

size

numeric shrinking factor for shapes (and coo_template; 3/4 by default)

palette

on of palettes

Value

a plot

Note

Directly inspired by Chitwood et al. (2016) in New Phytologist

Examples

x <- bot %>% efourier(6) %>% MSHAPES(~type)

# custom colors
x %>% plot_MSHAPES(palette=pal_manual(c("darkgreen", "orange")))

# also works on list of shapes, eg:
leaves <- shapes %>% slice(grep("leaf", names(shapes))) %$% coo
class(leaves)
leaves %>% plot_MSHAPES()

# or
shapes %>%
# subset and degrade
slice(1:12) %>% coo_sample(60) %$%  # grab the coo
    coo %>%
    plot_MSHAPES()

Momocs documentation built on Nov. 13, 2023, 5:07 p.m.

Related to plot_MSHAPES in Momocs...