pm4py.util.vis_utils module#
- pm4py.util.vis_utils.human_readable_stat(timedelta, stat_locale: Dict[str, str] | None = None) str[source]#
Transform a timedelta into a human readable string
- Parameters:
timedelta – Timedelta
- Returns:
Human readable string
- Return type:
string
- pm4py.util.vis_utils.get_arc_penwidth(arc_measure, min_arc_measure, max_arc_measure)[source]#
Calculate arc width given the current arc measure value, the minimum arc measure value and the maximum arc measure value
- Parameters:
arc_measure – Current arc measure value
min_arc_measure – Minimum measure value among all arcs
max_arc_measure – Maximum measure value among all arcs
- Returns:
Current arc width in the graph
- Return type:
penwidth
- pm4py.util.vis_utils.get_trans_freq_color(trans_count, min_trans_count, max_trans_count)[source]#
Gets transition frequency color
- Parameters:
trans_count – Current transition count
min_trans_count – Minimum transition count
max_trans_count – Maximum transition count
- Returns:
Frequency color for visible transition
- Return type:
color
- pm4py.util.vis_utils.get_base64_from_gviz(gviz)[source]#
Get base 64 from string content of the file
- Parameters:
gviz – Graphviz diagram
- Returns:
Base64 string
- Return type:
base64
- pm4py.util.vis_utils.get_base64_from_file(temp_file)[source]#
Get base 64 from string content of the file
- Parameters:
temp_file – Temporary file path
- Returns:
Base64 string
- Return type:
base64
- pm4py.util.vis_utils.check_visualization_inside_jupyter()[source]#
Checks if the visualization of the model is performed inside a Jupyter notebook
- pm4py.util.vis_utils.view_image_in_jupyter(file_name)[source]#
Visualizes a picture inside the Jupyter notebooks
- Parameters:
file_name – Name of the file
- pm4py.util.vis_utils.open_opsystem_image_viewer(file_name)[source]#
Visualizes a picture using the image viewer of the operating system
- Parameters:
file_name – Name of the file