combine_plot_and_tree {treeDA} | R Documentation |
Method for combining two ggplots
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
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.
[Package treeDA version 0.0.5 Index]