combine_plot_and_tree: Method for combining two ggplots

Description Usage Arguments Value

View source: R/plotting-functions.R

Description

This method takes a ggplot of some data along the tips of the tree and a ggplot of a tree and combines them. It assumes that you are putting the tree on top and that the x axis for the plot has the leaves in the correct position (this can be found using the function get_leaf_position).

Usage

1
combine_plot_and_tree(plot, tree.plot, tree.height = 5, print = TRUE)

Arguments

plot

A plot of data about the leaves with the x axis corresponding to leaves.

tree.plot

A plot of the tree.

tree.height

The relative amount of space in the plot the tree should take up.

print

If true, the function will print the combined plot to a graphics device, otherwise it will just return the gtable object without printing.

Value

Returns a gtable object.


jfukuyama/treeDA documentation built on May 18, 2021, 8:52 a.m.