phylo3D-printsummaryplot: Print, summary and plot methods for phylo3D objects

print.phylo3DR Documentation

Print, summary and plot methods for phylo3D objects

Description

print.phylo3D prints the contents of an object of class phylo3D. It provides a brief summary of the object structure and its contents.

plot.phylo3D creates a 2D projection plot of a phylo3D object, using the X and Z coordinates of each node. Each edge is drawn as a line segment between parent and child nodes.
For more elaborate 3D visualizations use plotPhylo3D() or addPhylo3D(), plotImbalPhylo3D() or addImbalPhylo3D(), or sketchPhylo3D().

summary.phylo3D provides a summary of an object of class phylo3D. It offers a high-level overview of the contents and their structure.

Usage

## S3 method for class 'phylo3D'
print(x, ...)

## S3 method for class 'phylo3D'
plot(x, edge_col = "black", edge_lwd_scale = 1, show_leaf_label = FALSE, ...)

## S3 method for class 'phylo3D'
summary(object, ...)

Arguments

x

An object of class phylo3D.

...

Additional arguments passed to plot().

edge_col

Color for the edges (default "black").

edge_lwd_scale

Scaling factor (default 1) for line width for the edges.

show_leaf_label

Logical (default FALSE), specifying if tip labels should be depicted.

object

An object of class phylo3D.

Value

print.phylo3D The input phylo3D object, returned invisibly. Called primarily for its side effect of printing a human-readable summary to the console.

The input phylo3D object, returned invisibly. This function is called for its side effect of displaying a plot.

summary.phylo3D An object of class summary.phylo3D, which contains summary information about the phylo3D object.

Examples

# Printing a 'phylo3D' object:
tree <- treeDbalance::extendPhylo(treeDbalance::example3Dtrees$bean09)
tree # same as print(tree)
# Simple plot of a 'phylo3D' object:
plot(tree, edge_col = "blue", show_leaf_label = TRUE)
# Summary of a 'phylo3D' object:
summary(tree)
str(summary(tree))

treeDbalance documentation built on Feb. 25, 2026, 1:06 a.m.