Skip to content

Commit 307f40e

Browse files
committed
DROP(plot): executed arg from plotting ...
now embeded in `Solution`.
1 parent f31d471 commit 307f40e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

graphtik/base.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,10 @@ def plot(
185185
as an "inverted-house"
186186
:param solution:
187187
an optional dict with values to annotate nodes, drawn "filled"
188-
(currently content not shown, but node drawn as "filled")
189-
:param executed:
190-
an optional container with operations executed, drawn "filled"
188+
(currently content not shown, but node drawn as "filled").
189+
It extracts more infos from a :class:`.Solution` instance, such as,
190+
if `solution` has an ``executed`` attribute, operations contained in it
191+
are drawn as "filled".
191192
:param title:
192193
an optional string to display at the bottom of the graph
193194
:param node_props:

graphtik/plot.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ def build_pydot(
144144
inputs=None,
145145
outputs=None,
146146
solution=None,
147-
executed=None,
148147
title=None,
149148
node_props=None,
150149
edge_props=None,
@@ -226,7 +225,7 @@ def get_node_name(a):
226225
if steps and nx_node in steps:
227226
kw["penwdth"] = steps_thickness
228227
shape = "egg" if isinstance(nx_node, NetworkOperation) else "oval"
229-
if executed and nx_node in executed:
228+
if nx_node in getattr(solution, "executed", ()):
230229
kw["style"] = "filled"
231230
kw["fillcolor"] = fill_color
232231
try:

0 commit comments

Comments
 (0)