pm4py.vis.view_prefix_tree#

pm4py.vis.view_prefix_tree(trie: Trie, format: str = 'png', bgcolor: str = 'white')[source]#

Views a prefix tree

Parameters:
  • prefix_tree – Prefix tree

  • format (str) – Format of the visualization (if html is provided, GraphvizJS is used to render the visualization in an HTML page)

  • bgcolor (str) – Background color of the visualization (default: white)

import pm4py

prefix_tree = pm4py.discover_prefix_tree(dataframe, activity_key='concept:name', case_id_key='case:concept:name', timestamp_key='time:timestamp')
pm4py.view_prefix_tree(prefix_tree, format='svg')