geom_tree | R Documentation |
add tree layer
geom_tree(
mapping = NULL,
data = NULL,
layout = "rectangular",
multiPhylo = FALSE,
continuous = "none",
position = "identity",
...
)
mapping |
aesthetic mapping |
data |
data of the tree |
layout |
one of 'rectangular', 'dendrogram', 'slanted', 'ellipse', 'roundrect', 'fan', 'circular', 'inward_circular', 'radial', 'equal_angle', 'daylight' or 'ape' |
multiPhylo |
logical, whether input data contains multiple phylo class, defaults to "FALSE". |
continuous |
character, continuous transition for selected aesthethic ('size' or 'color'('colour')). It should be one of 'color' (or 'colour'), 'size', 'all' and 'none', default is 'none' |
position |
Position adjustment, either as a string, or the result of a call to a position adjustment function, default is "identity". |
... |
additional parameter some dot arguments:
|
tree layer
geom_tree()
understands the following aesthethics:
color
character, control the color of line, default is black (continuous
is "none").
linetype
control the type of line, default is 1 (solid).
linewidth
numeric, control the width of line, default is 0.5 (continuous
is "none").
Yu Guangchuang
For demonstration of this function, please refer to chapter 4.2.1 of Data Integration, Manipulation and Visualization of Phylogenetic Trees http://yulab-smu.top/treedata-book/index.html by Guangchuang Yu.
tree <- rtree(10)
ggplot(tree) + geom_tree()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.