ggtreeplot | R Documentation |
'ggtreeplot()' wraps 'ggplot()', and initializes a new plot in the same way. It takes a 'ggtree()' object as additional argument. It aligns the plot data by a shared label column to the tips in the tree and fixes inconsistent limits and plot expansion space.
ggtreeplot(
ggtree,
data = NULL,
mapping = aes(),
flip = FALSE,
expand_limits = expand_scale(0, 0.6),
...
)
ggtree |
a ggtree plot object |
data |
Default dataset to use for plot. If not already a data.frame,
will be converted to one by |
mapping |
Default list of aesthetic mappings to use for plot. If not specified, must be supplied in each layer added to the plot. |
flip |
if the final plot will be flipped |
expand_limits |
Vector of range expansion constants used to add some padding around the data, to ensure that they are placed some distance away from the axes. Use the convenience function 'expand_scale()' to generate the values for the 'expand' argument. The defaults are to expand the scale by 0.6 units on each side for discrete variables. In contrast to the 'expand' argument of the the scales functions, this expansion space is directly added to the limits, thus all data within the limit+expansions space is plotted. |
... |
Other arguments passed on to methods. Not currently used. |
https://thackl.github.io/ggtree-composite-plots
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.