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
Copy file name to clipboardExpand all lines: docs/src/model_creation/model_visualisation.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,11 +36,11 @@ If you wish to copy the output to your [clipboard](https://en.wikipedia.org/wiki
36
36
For a model to be nicely displayed you have to use an IDE that actually supports this (such as a [notebook](https://jupyter.org/)). Other environments (such as [the Julia REPL](https://docs.julialang.org/en/v1/stdlib/REPL/)) will simply return the full LaTeX code which would generate the desired expression.
37
37
38
38
## [Displaying model networks](@id visualisation_graphs)
39
-
Catalyst uses `GraphMakie` to display representations of chemical reaction networks, including the complex graph and the species-reaction graph (which is similar to the [Petri net](https://en.wikipedia.org/wiki/Petri_net) representation). To get started, import Catalystand GraphMakie to load the `CatalystGraphMakieExtension` extension, and then load a Makie backend (`GLMakie` is recommended).
39
+
Catalyst uses `GraphMakie` to display representations of chemical reaction networks, including the complex graph and the species-reaction graph (which is similar to the [Petri net](https://en.wikipedia.org/wiki/Petri_net) representation). To get started, import Catalyst, GraphMakie, and NetworkLayout to load the `CatalystGraphMakieExtension` extension, and then load a Makie backend (`CairoMakie` is a good lightweight choice).
Creates a GraphMakie plot of the [`ReactionComplex`](@ref)s in `rn`. Reactions
215
215
correspond to arrows and reaction complexes to blue circles.
@@ -219,10 +219,12 @@ end
219
219
parameter or a `Number`. i.e. `k, A --> B`.
220
220
- Red arrows from complexes to complexes indicate reactions whose rate
221
221
depends on species. i.e. `k*C, A --> B` for `C` a species.
222
+
- The `show_rate_labels` keyword, if set to `true`, will annotate each edge
223
+
with the rate constant for the reaction.
222
224
223
225
For a list of accepted keyword arguments to the graph plot, please see the [GraphMakie documentation](https://graph.makie.org/stable/#The-graphplot-Recipe).
224
226
"""
225
-
function Catalyst.plot_complexes(rn::ReactionSystem; kwargs...)
227
+
function Catalyst.plot_complexes(rn::ReactionSystem; show_rate_labels =false, kwargs...)
226
228
rxs =reactions(rn)
227
229
specs =species(rn)
228
230
edgecolors = [:blackfor i in1:length(rxs)]
@@ -238,13 +240,13 @@ function Catalyst.plot_complexes(rn::ReactionSystem; kwargs...)
238
240
# 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