pm4py.vis.save_vis_network_analysis#

pm4py.vis.save_vis_network_analysis(network_analysis: Dict[Tuple[str, str], Dict[str, Any]], file_path: str, variant: str = 'frequency', activity_threshold: int = 1, edge_threshold: int = 1, bgcolor: str = 'white', graph_title: str | None = None, **kwargs)[source]#

Saves the visualization of the network analysis.

Parameters:
  • network_analysis – Network analysis

  • file_path (str) – Target path

  • variant (str) – “frequency” or “performance”

  • activity_threshold (int) – Minimum occurrences of an activity

  • edge_threshold (int) – Minimum occurrences of an edge

  • bgcolor (str) – Background color (default: white)

  • graph_title – Title of the visualization (if provided)

import pm4py

net_ana = pm4py.discover_network_analysis(dataframe, out_column='case:concept:name', in_column='case:concept:name', node_column_source='org:resource', node_column_target='org:resource', edge_column='concept:name')
pm4py.save_vis_network_analysis(net_ana, 'net_ana.png')