pm4py.vis.view_dfg#

pm4py.vis.view_dfg(dfg: dict, start_activities: dict, end_activities: dict, format: str = 'png', bgcolor: str = 'white', max_num_edges: int = 9223372036854775807, rankdir: str = 'LR')[source]#

Views a (composite) DFG

Parameters:
  • dfg (dict) – DFG object

  • start_activities (dict) – Start activities

  • end_activities (dict) – End activities

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

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

  • max_num_edges (int) – maximum number of edges to represent in the graph

  • rankdir (str) – sets the direction of the graph (“LR” for left-to-right; “TB” for top-to-bottom)

import pm4py

dfg, start_activities, end_activities = pm4py.discover_dfg(dataframe, case_id_key='case:concept:name', activity_key='concept:name', timestamp_key='time:timestamp')
pm4py.view_dfg(dfg, start_activities, end_activities, format='svg')