visualife.diagrams Package

Functions

average_point(points) Determines a Point that is an average of given Point objects.
balance_binary_tree(root) Balances a binary tree
clone_tree(node, n_levels) Creates a deep copy of a given tree, that might be limited in depth
deepcopy(x[, memo, _nil]) Deep copy operation on arbitrary Python objects.
repack_node_style_args(node_style_dict, …) Repacks drawing style for node and text
subtree_size(root) Calculates size of every subtree of a give tree

Classes

BTreeNode(id, value[, left, right]) Creates a binary tree node.
CircularDendrogram(id, viewport, …) Draws a binary tree using a circular dendrogram layout
Connector(id, *points, **attrs) Connector is a line path that connects two nodes of a diagram.
DendrogramLayout(id, viewport, max_screen_x, …) Draws a binary tree using a dendrogram layout
DendrogramNode(id, value, distance, *nodes) Dendrogram node adds a distance value and a group_id properties to a TreeNode class
Diagram(viewport, id, **kwargs) Diagrams made out of rectangular shapes, possibly connected with lines.
DiamondNode(id, text, xc, yc, w, **attrs) Draws a diamond node.
DotNode(id, x, y, r, **attrs) Creates a node that is dot.
InteractiveCondition(node, code_snippet, …)
InteractiveDiagram(viewport, id) Diagram that can execute code snippets
InteractiveNode(node, code_snippet, **params) Extends InteractiveNode with a code snipped.
NodeBase(id, x, y) A base class to all nodes.
Point(x, y) A simple data structure to hold X,Y coordinates on a screen.
RectNode(id, text, xc, yc, w, h, **attrs) Rectangular node of a diagram - a box with a text in it.
TreeLayout(id, viewport, max_screen_x, …) Base class for drawing a tree
TreeNode(id, value) Creates a tree node.
TriangularLayout(id, viewport, min_screen_x, …) Draws a binary tree using a triangular layout