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.
54
-
functionComplexGraphWrap(rn::ReactionSystem)
55
+
functionComplexGraphWrap(rn::ReactionSystem)
55
56
img =incidencematgraph(rn)
56
-
D =incidencemat(rn; sparse=true)
57
+
D =incidencemat(rn; sparse=true)
57
58
specs =species(rn)
58
59
rxs =reactions(rn)
59
60
@@ -78,7 +79,7 @@ function ComplexGraphWrap(rn::ReactionSystem)
red and black arrows from `A` to the reaction node.
159
160
160
161
For a list of accepted keyword arguments to the graph plot, please see the [GraphMakie documentation](https://graph.makie.org/stable/#The-graphplot-Recipe).
161
-
"""
162
+
"""
162
163
function Catalyst.plot_network(rn::ReactionSystem; kwargs...)
# If there are stoichiometry and rate edges from the same species to reaction
184
-
if srg.edgeorder[i] > num_e
185
+
if srg.edgeorder[i] > num_e
185
186
edgecolors[i] =:red
186
187
insert!(edgelabels, i, "")
187
188
elseif edgelabels[i] =="0"
@@ -190,29 +191,29 @@ function Catalyst.plot_network(rn::ReactionSystem; kwargs...)
190
191
end
191
192
end
192
193
193
-
layout =if!haskey(kwargs, :layout)
194
+
layout =if!haskey(kwargs, :layout)
194
195
Stress()
195
196
end
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
-
)
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
+
)
209
210
210
211
f.axis.xautolimitmargin = (0.15, 0.15)
211
212
f.axis.yautolimitmargin = (0.15, 0.15)
212
213
hidedecorations!(f.axis)
213
214
hidespines!(f.axis)
214
215
f.axis.aspect =DataAspect()
215
-
216
+
216
217
f
217
218
end
218
219
@@ -248,21 +249,21 @@ function Catalyst.plot_complexes(rn::ReactionSystem; show_rate_labels = false, k
248
249
# 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