Skip to content

Commit f9d01a3

Browse files
vyuduisaacsas
andauthored
Update ext/CatalystGraphMakieExtension/rn_graph_plot.jl
Co-authored-by: Sam Isaacson <[email protected]>
1 parent 91abcd1 commit f9d01a3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/CatalystGraphMakieExtension/rn_graph_plot.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,11 @@ function plot_complex_graph(rn::ReactionSystem; interactive = false)
155155
nodelabels = complexlabels(rn)
156156
edgelabels = [repr(rx.rate) for rx in rxs]
157157

158+
deps = Set()
158159
for (i, rx) in enumerate(rxs)
159-
deps = get_variables(rx.rate, specs)
160-
if deps != Any[]
161-
edgecolors[i] = :red
162-
end
160+
empty!(deps)
161+
get_variables!(deps, rx.rate, specs)
162+
(!isempty(deps)) && (edgecolors[i] = :red)
163163
end
164164

165165
f, ax, p = graphplot(img;

0 commit comments

Comments
 (0)