pm4py.vis.save_vis_object_graph#

pm4py.vis.save_vis_object_graph(ocel: OCEL, graph: Set[Tuple[str, str]], file_path: str, bgcolor: str = 'white', rankdir: str = 'LR', **kwargs)[source]#

Saves the visualization of an object graph

Parameters:
  • ocel (OCEL) – object-centric event log

  • graph – object graph

  • file_path (str) – Destination path

  • bgcolor (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)

import pm4py

ocel = pm4py.read_ocel('trial.ocel')
obj_graph = pm4py.ocel_discover_objects_graph(ocel, graph_type='object_interaction')
pm4py.save_vis_object_graph(ocel, obj_graph, 'trial.pdf')