pm4py.vis.save_vis_process_tree#
- pm4py.vis.save_vis_process_tree(tree: ProcessTree, file_path: str, bgcolor: str = 'white', rankdir: str = 'LR', graph_title: str | None = None, **kwargs)[source]#
Saves the visualization of a process tree.
- Parameters:
tree (
ProcessTree) – Process treefile_path (
str) – Destination pathbgcolor (
str) – Background color of the visualization (default: white)rankdir (
str) – Sets the direction of the graph (“LR” for left-to-right; “TB” for top-to-bottom)graph_title – Sets the title of the visualization (if provided)
import pm4py process_tree = pm4py.discover_process_tree_inductive(dataframe, activity_key='concept:name', case_id_key='case:concept:name', timestamp_key='time:timestamp') pm4py.save_vis_process_tree(process_tree, 'process_tree.png')