Skip to content

Commit 411bc6d

Browse files
authored
Merge pull request #153 from kayjan/feature/hprint-tree
Feature/hprint tree
2 parents fcec8d3 + 3059c23 commit 411bc6d

File tree

8 files changed

+713
-27
lines changed

8 files changed

+713
-27
lines changed

bigtree/node/node.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class Node(BaseNode):
6666
`Node` methods
6767
6868
1. ``show()``: Print tree to console
69+
2. ``hshow()``: Print tree in horizontal orientation to console
6970
7071
----
7172
@@ -213,6 +214,12 @@ def show(self, **kwargs: Any) -> None:
213214

214215
print_tree(self, **kwargs)
215216

217+
def hshow(self, **kwargs: Any) -> None:
218+
"""Print tree in horizontal orientation to console, takes in same keyword arguments as `hprint_tree` function"""
219+
from bigtree.tree.export import hprint_tree
220+
221+
hprint_tree(self, **kwargs)
222+
216223
def __getitem__(self, child_name: str) -> T:
217224
"""Get child by name identifier
218225

0 commit comments

Comments
 (0)