Learn R Programming

GeometricMorphometricsMix (version 0.6.0.1)

plot.parallel_Kmult: Plot method for parallel_Kmult objects

Description

Creates density plots of Kmult values, with separate densities for each combination of dataset and treeset (if multiple combinations are present).

Usage

# S3 method for parallel_Kmult
plot(x, alpha = 0.25, title = NULL, x_lab = "Kmult", ...)

Value

A ggplot object

Arguments

x

An object of class 'parallel_Kmult' produced by Kmultparallel

alpha

Transparency level for density plots (0-1, default = 0.25)

title

Character string for plot title (default NULL for automatic title)

x_lab

Character string for x-axis label (default "Kmult")

...

Additional arguments passed to the plotting function

Examples

Run this code
# \donttest{
# Create simple example data
library(phytools)
trees = replicate(5, pbtree(n = 20), simplify = FALSE)
class(trees) = "multiPhylo"
data = matrix(rnorm(20 * 4), nrow = 20, ncol = 4)
rownames(data) = trees[[1]]$tip.label

# Run analysis and plot results
result = Kmultparallel(data, trees)
plot(result)

# With custom settings
plot(result, alpha = 0.5, title = "Kmult Distribution")
# }

Run the code above in your browser using DataLab