Generate a ggtree Plot from a Distance Tree
Source:R/tourSetlistDistanceTree.R
create_ggtree_plot.Rd
This function generates a ggtree plot from a given distance tree object. It utilizes the `ggtree` package to create a visual representation of the phylogenetic tree, including tips and customized themes for better visualization.
Examples
library(ggtree)
#> ggtree v3.14.0 Learn more at https://yulab-smu.top/contribution-tree-data/
#>
#> Please cite:
#>
#> Shuangbin Xu, Lin Li, Xiao Luo, Meijun Chen, Wenli Tang, Li Zhan, Zehan
#> Dai, Tommy T. Lam, Yi Guan, Guangchuang Yu. Ggtree: A serialized data
#> object for visualization of a phylogenetic tree and annotation data.
#> iMeta 2022, 1(4):e56. doi:10.1002/imt2.56
# Example tree structure (replace with actual tree object)
setlist_tree <- rtree(10) # Generate a random tree with 10 tips
plot <- create_ggtree_plot(setlist_tree)
#> Error in coord_cartesian(clip = "off"): could not find function "coord_cartesian"
print(plot)
#> function (x, y, ...)
#> UseMethod("plot")
#> <bytecode: 0x56319665baf0>
#> <environment: namespace:base>