Skip to content

Commit 68946f0

Browse files
making visualization more compact
1 parent aa144a0 commit 68946f0

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

pm4py/visualization/ocel/ocpn/variants/wo_decoration.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,14 @@ def apply(
128128
# case
129129
if place in all_places_diagn:
130130
this_diagn = all_places_diagn[place]
131-
place_label = "p=%d m=%d\nc=%d r=%d" % (
132-
this_diagn["p"],
133-
this_diagn["m"],
134-
this_diagn["c"],
135-
this_diagn["r"],
136-
)
131+
if place_shape == "circle":
132+
place_shape = "ellipse"
133+
place_label = "p=%d m=%d\nc=%d r=%d" % (
134+
this_diagn["p"],
135+
this_diagn["m"],
136+
this_diagn["c"],
137+
this_diagn["r"],
138+
)
137139

138140
viz.node(
139141
places[place],
@@ -190,6 +192,7 @@ def apply(
190192
label=arc_label,
191193
)
192194

195+
viz.attr('graph', nodesep='0.1', ranksep='0.2')
193196
viz.attr(rankdir=rankdir)
194197
viz.format = image_format.replace("html", "plain-ext")
195198

0 commit comments

Comments
 (0)