pm4py no visualization
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2024 03:20 AM
Hi,
I am trying to use pm4py library to visualize my data. my code executes perfectly but there is no visualization how can i solve this problem ? There is no error message
#processmining # databricks #pm4py
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2025 08:50 PM
I believe we do not support GUI-based viewers like pm4py.visualizer.view(gviz), which tries to open a file using your system's default image/PDF viewer.
Could you try visualizing and then saving the output -
import pm4py
# Sample log (replace with your own)
log = pm4py.read_xes("/dbfs/tmp/example.xes")
dfg = pm4py.discover_dfg(log)
# Create visual object
gviz = pm4py.visualization.dfg.visualizer.apply(dfg, log=log)
# Save the image to DBFS
pm4py.visualization.dfg.visualizer.save(gviz, "/dbfs/tmp/dfg_output.png")
Then displaying the output in the notebook -
displayHTML("<img src='/files/tmp/dfg_output.png'/>")