Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions bigtree/dag/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ def dag_to_dot(
>>> e = DAGNode("e", step=3, parents=[d])
>>> dag_graph = dag_to_dot(a)

Display image directly without saving (requires IPython)

>>> from IPython.display import Image, display
>>> plt = Image(dag_graph.create_png())
>>> display(plt)

Export to image, dot file, etc.

>>> dag_graph.write_png("tree_dag.png")
Expand Down
6 changes: 6 additions & 0 deletions bigtree/tree/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,12 @@ def tree_to_dot(
>>> e = Node("e", age=35, parent=b)
>>> graph = tree_to_dot(root)

Display image directly without saving (requires IPython)

>>> from IPython.display import Image, display
>>> plt = Image(graph.create_png())
>>> display(plt)

Export to image, dot file, etc.

>>> graph.write_png("tree.png")
Expand Down