neurotools.graphics.dendron module

neurotools.graphics.dendron.list_like(tree)[source]
neurotools.graphics.dendron.get_depth(tree)[source]

Get depth of tree-like structure. The tree can be given as any nested structure of iterables (strings are not counted as iterable, however)

neurotools.graphics.dendron.count_nodes(tree)[source]

Count leaf nodes of tree-like structure. The tree can be given as any nested structure of iterables (strings are not counted as iterable, however)

neurotools.graphics.dendron.inorder_traversal(tree)[source]

Return leaves of the tree in order. Can also be used like a “deep flatten” command to flatten nested list and tuple structures. The tree can be given as any nested structure of iterables (strings are not counted as iterable, however)

neurotools.graphics.dendron.plot_brackets(tree, lw=1, color='k')[source]
neurotools.graphics.dendron.plot_brackets_polar(tree, lw=0.5, color='k', rotate_labels=True, label_offset=3, arcspan=1, angle=0, figsize=9, fontsize=9, line_resolution=50)[source]