DendrogramLayout¶
-
class
visualife.diagrams.DendrogramLayout(id, viewport, max_screen_x, max_screen_y, **kwargs)¶ Bases:
visualife.diagrams.TreeLayoutDraws a binary tree using a dendrogram layout
Dendrogram layout is suitable for drawing clustering results, phylogenetic trees etc.
Parameters: id – ( string) a string that is used to identify graphical elements of this tree.ID of a node will be created as
ID-idxwhereIDis the ID of this layout object andidxis the index of a node :param viewport: (SvgViewport) its derivative :param min_screen_x: (int) - left screen coordinate :param max_screen_x: (int) - right screen coordinate :param min_screen_y: (int) - top screen coordinate :param max_screen_y: (int) - bottom screen coordinate :param kwargs: - see belowKeyword Arguments (**kwargs) (**kwargs):- width (
number) – width of each node in pixels - height (
number) – height of each node in pixels - separation (
number) – minimum separation between nodes in pixels
Methods Summary
draw(root_node, **kwargs)Draws a binary tree given by its root node :param root_node: ( BTreeNode) - root of the tree :param kwargs: see arguments parsed TreeLayout.set_style();Methods Documentation
-
draw(root_node: visualife.diagrams.TreeNode.TreeNode, **kwargs)¶ Draws a binary tree given by its root node :param root_node: (
BTreeNode) - root of the tree :param kwargs: see arguments parsed TreeLayout.set_style();
- width (