From f9d01a3f3e7fb3a437ee9acc0621456dfe49da86 Mon Sep 17 00:00:00 2001 From: Vincent Du <54586336+vyudu@users.noreply.github.com> Date: Fri, 15 Nov 2024 10:41:14 -0500 Subject: [PATCH] Update ext/CatalystGraphMakieExtension/rn_graph_plot.jl Co-authored-by: Sam Isaacson --- ext/CatalystGraphMakieExtension/rn_graph_plot.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/CatalystGraphMakieExtension/rn_graph_plot.jl b/ext/CatalystGraphMakieExtension/rn_graph_plot.jl index 0fb833f90..8acbfc1ef 100644 --- a/ext/CatalystGraphMakieExtension/rn_graph_plot.jl +++ b/ext/CatalystGraphMakieExtension/rn_graph_plot.jl @@ -155,11 +155,11 @@ function plot_complex_graph(rn::ReactionSystem; interactive = false) nodelabels = complexlabels(rn) edgelabels = [repr(rx.rate) for rx in rxs] + deps = Set() for (i, rx) in enumerate(rxs) - deps = get_variables(rx.rate, specs) - if deps != Any[] - edgecolors[i] = :red - end + empty!(deps) + get_variables!(deps, rx.rate, specs) + (!isempty(deps)) && (edgecolors[i] = :red) end f, ax, p = graphplot(img;