pm4py.vis.save_vis_performance_dfg#
- pm4py.vis.save_vis_performance_dfg(dfg: dict, start_activities: dict, end_activities: dict, file_path: str, aggregation_measure='mean', bgcolor: str = 'white', rankdir: str = 'LR', serv_time: Dict[str, float] | None = None, **kwargs)[source]#
Saves the visualization of a performance DFG
- Parameters:
dfg (
dict
) – DFG objectstart_activities (
dict
) – Start activitiesend_activities (
dict
) – End activitiesfile_path (
str
) – Destination pathaggregation_measure (
str
) – Aggregation measure (default: mean): mean, median, min, max, sum, stdevbgcolor (
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)serv_time – (optional) provides the activities’ service times, used to decorate the graph
import pm4py performance_dfg, start_activities, end_activities = pm4py.discover_performance_dfg(dataframe, case_id_key='case:concept:name', activity_key='concept:name', timestamp_key='time:timestamp') pm4py.save_vis_performance_dfg(performance_dfg, start_activities, end_activities, 'perf_dfg.png')