Plot Module Tree#
(nbrefactor.visualization.plot_module_tree)
Visualization methods for refactored notebooks
- plot_module_tree(root_node, format='pdf')[source]#
Visualize the
ModuleNodetree structure and save it as a PDF.Primarily used for debugging and ensuring the generated structure is as intended.
- Parameters:
root_node (
ModuleNode) – the root node of the tree to visualize.output_path (str) – the file path where the PDF should be saved.
- Returns:
the module tree graph to be plotted or saved
- Return type:
graphviz.Digraph