pm4py.vis#

The pm4py.vis module contains the visualizations offered in pm4py.

Note on Graphviz-based visualizations (e.g., Petri nets, DFGs, BPMN, process trees):

Supported output formats include:

  • png: Generates a PNG image.

  • svg: Generates an SVG image, which can be scaled without loss of quality.

  • pdf: Generates a PDF file, suitable for printing and embedding in documents.

  • gv: Returns or saves the Dot source code of the Graphviz graph.

  • html: When ‘html’ is provided as the format, the visualization is rendered in an HTML page using GraphvizJS. This allows interactive viewing of the graph directly in a web browser.

If html is used, an HTML file containing the GraphvizJS-based rendering is produced, enabling panning, zooming, and other interactive features.

In general, for Graphviz-based visualizations, if you provide a format extension, the visualization will be generated accordingly. For example: - format=’png’ will produce a PNG file. - format=’svg’ will produce an SVG file. - format=’pdf’ will produce a PDF file. - format=’gv’ will return/save the raw Dot code. - format=’html’ will produce an interactive HTML visualization using GraphvizJS.

Functions

save_vis_alignments(log, aligned_traces, ...)

Saves an alignment table's figure on disk.

save_vis_bpmn(bpmn_graph, file_path[, ...])

Saves the visualization of a BPMN graph.

save_vis_case_duration_graph(log, file_path)

Saves the case duration graph to the specified path.

save_vis_dfg(dfg, start_activities, ...[, ...])

Saves a DFG visualization to a file.

save_vis_dotted_chart(log, file_path[, ...])

Saves the visualization of the dotted chart.

save_vis_events_distribution_graph(log, ...)

Saves the distribution of the events in a picture file.

save_vis_events_per_time_graph(log, file_path)

Saves the events per time graph to the specified path.

save_vis_footprints(footprints, file_path[, ...])

Saves the footprints' visualization on disk.

save_vis_heuristics_net(heu_net, file_path)

Saves the visualization of a heuristics net.

save_vis_network_analysis(network_analysis, ...)

Saves the visualization of the network analysis.

save_vis_object_graph(ocel, graph, file_path)

Saves the visualization of an object graph.

save_vis_ocdfg(ocdfg, file_path[, ...])

Saves the visualization of an OC-DFG.

save_vis_ocpn(ocpn, file_path[, bgcolor, ...])

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

save_vis_performance_dfg(dfg, ...[, ...])

Saves the visualization of a performance DFG.

save_vis_performance_spectrum(log, ...[, ...])

Saves the visualization of the performance spectrum to a file.

save_vis_petri_net(petri_net, ...[, ...])

Saves a Petri net visualization to a file.

save_vis_powl(powl, file_path[, bgcolor, ...])

Saves the visualization of a POWL model.

save_vis_prefix_tree(trie, file_path[, ...])

Persists the visualization of a prefix tree.

save_vis_process_tree(tree, file_path[, ...])

Saves the visualization of a process tree.

save_vis_sna(sna_metric, file_path[, ...])

Saves the visualization of a SNA metric in a .html file.

save_vis_transition_system(...[, bgcolor, ...])

Persists the visualization of a transition system.

view_alignments(log, aligned_traces[, ...])

Views the alignment table as a figure.

view_bpmn(bpmn_graph[, format, bgcolor, ...])

Views a BPMN graph.

view_case_duration_graph(log[, format, ...])

Visualizes the case duration graph.

view_dfg(dfg, start_activities, end_activities)

Views a (composite) DFG.

view_dotted_chart(log[, format, attributes, ...])

Displays the dotted chart.

view_events_distribution_graph(log[, ...])

Shows the distribution of the events in the specified dimension.

view_events_per_time_graph(log[, format, ...])

Visualizes the events per time graph.

view_footprints(footprints[, format, ...])

Views the footprints as a figure.

view_heuristics_net(heu_net[, format, ...])

Views a heuristics net.

view_network_analysis(network_analysis[, ...])

Visualizes the network analysis.

view_object_graph(ocel, graph[, format, ...])

Visualizes an object graph on the screen.

view_ocdfg(ocdfg[, annotation, act_metric, ...])

Views an OC-DFG (object-centric directly-follows graph).

view_ocpn(ocpn[, format, bgcolor, rankdir, ...])

Visualizes the object-centric Petri net.

view_performance_dfg(dfg, start_activities, ...)

Views a performance DFG.

view_performance_spectrum(log, activities[, ...])

Displays the performance spectrum.

view_petri_net(petri_net[, initial_marking, ...])

Views a (composite) Petri net.

view_powl(powl[, format, bgcolor, ...])

Performs a visualization of a POWL model.

view_prefix_tree(trie[, format, bgcolor, ...])

Views a prefix tree.

view_process_tree(tree[, format, bgcolor, ...])

Views a process tree.

view_sna(sna_metric[, variant_str])

Represents a SNA metric (.html).

view_transition_system(transition_system[, ...])

Views a transition system.