pm4py.visualization.dfg.util package#

This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).

PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

PM4Py is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.

Submodules#

pm4py.visualization.dfg.util.dfg_gviz module#

This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).

PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

PM4Py is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with PM4Py. If not, see <https://www.gnu.org/licenses/>.

pm4py.visualization.dfg.util.dfg_gviz.get_activities_color(activities_count)[source]#

Get frequency color for attributes

Parameters#

activities_count

Count of attributes in the log

Returns#

activities_color

Color assigned to attributes in the graph

pm4py.visualization.dfg.util.dfg_gviz.get_activities_color_soj_time(soj_time)[source]#

Gets the color for the activities based on the sojourn time

Parameters#

soj_time

Sojourn time

Returns#

act_color

Dictionary associating each activity to a color based on the sojourn time

pm4py.visualization.dfg.util.dfg_gviz.get_min_max_value(dfg)[source]#

Gets min and max value assigned to edges in DFG graph

Parameters#

dfg

Directly follows graph

Returns#

min_value

Minimum value in directly follows graph

max_value

Maximum value in directly follows graph

pm4py.visualization.dfg.util.dfg_gviz.assign_penwidth_edges(dfg)[source]#

Assign penwidth to edges in directly-follows graph

Parameters#

dfg

Direcly follows graph

Returns#

penwidth

Graph penwidth that edges should have in the direcly follows graph

pm4py.visualization.dfg.util.dfg_gviz.graphviz_visualization(activities_count, dfg, image_format='png', measure='frequency', max_no_of_edges_in_diagram=100000, start_activities=None, end_activities=None, soj_time=None, font_size='12', bgcolor='white', rankdir='LR')[source]#

Do GraphViz visualization of a DFG graph

Parameters#

activities_count

Count of attributes in the log (may include attributes that are not in the DFG graph)

dfg

DFG graph

image_format

GraphViz should be represented in this format

measure

Describes which measure is assigned to edges in direcly follows graph (frequency/performance)

max_no_of_edges_in_diagram

Maximum number of edges in the diagram allowed for visualization

start_activities

Start activities of the log

end_activities

End activities of the log

soj_time

For each activity, the sojourn time in the log

font_size

Size of the text on the activities/edges

bgcolor

Background color of the visualization (i.e., ‘transparent’, ‘white’, …)

rankdir

Direction of the graph (“LR” for left-to-right; “TB” for top-to-bottom)

Returns#

viz

Digraph object