This function is adding a new layer plot of a nodeGroup on the previous plot each time plot one node. a nodeGroup of the internal node is composed of the node, the arc/horisontal line along with it and the path to its parent node, the tips nodeGroup is similar to internal node but without the arc line.
1 |
tree |
tree data frame with updated x y coordinate information |
layers |
layer data frame contaions all layers data |
idx |
the index of the point in tree data frame |
plot_arg |
pass the base plot to adding more layer on top of it |
npoint |
the number of points of each layer |
tip |
this flag is for detecting whether the point is tip or internal node |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.