pm4py.vis.save_vis_prefix_tree#
- pm4py.vis.save_vis_prefix_tree(trie: Trie, file_path: str, bgcolor: str = 'white', graph_title: str | None = None, **kwargs)[source]#
Persists the visualization of a prefix tree.
- Parameters:
trie (
Trie) – Prefix treefile_path (
str) – Destination pathbgcolor (
str) – Background color (default: white)graph_title – Title of the visualization (if provided)
import pm4py prefix_tree = pm4py.discover_prefix_tree(dataframe, activity_key='concept:name', case_id_key='case:concept:name', timestamp_key='time:timestamp') pm4py.save_vis_prefix_tree(prefix_tree, 'trie.png')