Hi everyone. I’ve created an ensemble problem for a reaction network with many species. However, currently, the plot shows each trajectory for each species. For example, my reaction network has 19 species, so when I specify two trajectories in the ensemble problem, I see 38 trajectories on the plot. Is there a way that I can isolate the trajectories for a specific species on the plot? Thanks!
Can you provide a MWE of your code we can run? It will be easier to show how to plot components from that.
Difficult to answer without knowing which packages you are using. If it’s
DifferentialEquations.jl or related, in conjunction with
Plots.jl, then you may find the solution here Plot Functions · DifferentialEquations.jl
Here’s an example if you are using Catalyst:
using Catalyst, DifferentialEquations, Plots rn = @reaction_network begin 1.0, A --> 0 2.0, B --> 0 4.0, C --> 0 end dprob = DiscreteProblem(rn, [:A => 100, :B => 10, :C => 5], (0.0,20.0)) jprob = JumpProblem(rn, dprob, Direct()) eprob = EnsembleProblem(jprob) sims = solve(eprob, SSAStepper(), trajectories=100) @unpack C = rn plot(sims, idxs=C)