pm4py.vis.save_vis_ocpn#

pm4py.vis.save_vis_ocpn(ocpn: Dict[str, Any], file_path: str, bgcolor: str = 'white', rankdir: str = 'LR', graph_title: str | None = None, variant_str: str = 'wo_decoration', **kwargs)[source]#

Saves the visualization of the object-centric Petri net into a file.

Parameters:
  • ocpn – Object-centric Petri net

  • file_path (str) – Target path

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

  • rankdir (str) – Graph direction (“LR” or “TB”)

  • graph_title – Title of the visualization (if provided)

  • variant_str (str) – Variant to be used (“wo_decoration” or “brachmann”)

import pm4py

ocpn = pm4py.discover_oc_petri_net(ocel)
pm4py.save_vis_ocpn(ocpn, 'ocpn.png')