You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Return the multigraph and reaction order corresponding to the complex graph. The reaction order is the order of reactions(rn) that would match the edge order given by g.edgeorder.
55
-
functionComplexGraphWrap(rn::ReactionSystem)
54
+
functionComplexGraphWrap(rn::ReactionSystem)
56
55
img =incidencematgraph(rn)
57
-
D =incidencemat(rn; sparse=true)
56
+
D =incidencemat(rn; sparse=true)
58
57
specs =species(rn)
59
58
rxs =reactions(rn)
60
59
@@ -79,7 +78,7 @@ function ComplexGraphWrap(rn::ReactionSystem)
red and black arrows from `A` to the reaction node.
160
159
161
160
For a list of accepted keyword arguments to the graph plot, please see the [GraphMakie documentation](https://graph.makie.org/stable/#The-graphplot-Recipe).
162
-
"""
161
+
"""
163
162
function Catalyst.plot_network(rn::ReactionSystem; kwargs...)
# If there are stoichiometry and rate edges from the same species to reaction
185
-
if srg.edgeorder[i] > num_e
184
+
if srg.edgeorder[i] > num_e
186
185
edgecolors[i] =:red
187
186
insert!(edgelabels, i, "")
188
187
elseif edgelabels[i] =="0"
@@ -191,29 +190,29 @@ function Catalyst.plot_network(rn::ReactionSystem; kwargs...)
191
190
end
192
191
end
193
192
194
-
layout =if!haskey(kwargs, :layout)
193
+
layout =if!haskey(kwargs, :layout)
195
194
Stress()
196
195
end
197
-
f =graphplot(srg;
198
-
layout,
199
-
edge_color = edgecolors,
200
-
elabels = edgelabels,
201
-
elabels_rotation =0,
202
-
ilabels = ilabels,
203
-
node_color = nodecolors,
204
-
arrow_shift =:end,
205
-
arrow_size =20,
206
-
curve_distance_usage =true,
207
-
curve_distance =gen_distances(srg),
208
-
kwargs...
209
-
)
196
+
f =graphplot(srg;
197
+
layout,
198
+
edge_color = edgecolors,
199
+
elabels = edgelabels,
200
+
elabels_rotation =0,
201
+
ilabels = ilabels,
202
+
node_color = nodecolors,
203
+
arrow_shift =:end,
204
+
arrow_size =20,
205
+
curve_distance_usage =true,
206
+
curve_distance =gen_distances(srg),
207
+
kwargs...
208
+
)
210
209
211
210
f.axis.xautolimitmargin = (0.15, 0.15)
212
211
f.axis.yautolimitmargin = (0.15, 0.15)
213
212
hidedecorations!(f.axis)
214
213
hidespines!(f.axis)
215
214
f.axis.aspect =DataAspect()
216
-
215
+
217
216
f
218
217
end
219
218
@@ -249,21 +248,21 @@ function Catalyst.plot_complexes(rn::ReactionSystem; show_rate_labels = false, k
249
248
# Get complex graph and reaction order for edgecolors and edgelabels. rxorder gives the order of reactions(rn) that would match the edge order in edges(cg).
0 commit comments