diff --git a/src/ensemble/ensemble_solutions.jl b/src/ensemble/ensemble_solutions.jl index 265918f3e..5d371269a 100644 --- a/src/ensemble/ensemble_solutions.jl +++ b/src/ensemble/ensemble_solutions.jl @@ -139,7 +139,8 @@ end @recipe function f(sim::AbstractEnsembleSolution; zcolors = typeof(sim.u) <: AbstractArray ? fill(nothing, length(sim.u)) : nothing, - trajectories = eachindex(sim)) + trajectories = eachindex(sim), + idxs = nothing) for i in trajectories size(sim[i].u, 1) == 0 && continue @series begin @@ -148,6 +149,9 @@ end ylims --> (-Inf, Inf) zlims --> (-Inf, Inf) marker_z --> zcolors[i] + if idxs !== nothing + idxs --> idxs + end sim[i] end end @@ -156,7 +160,8 @@ end @recipe function f(sim::EnsembleSummary; trajectories = typeof(sim.u[1]) <: AbstractArray ? eachindex(sim.u[1]) : 1, - error_style = :ribbon, ci_type = :quantile) + error_style = :ribbon, ci_type = :quantile, + idxs = nothing) if ci_type == :SEM if typeof(sim.u[1]) <: AbstractArray u = vecarr_to_vectors(sim.u) @@ -193,6 +198,9 @@ end legend --> false linewidth --> 3 fillalpha --> 0.2 + if idxs !== nothing + idxs --> idxs + end if error_style == :ribbon ribbon --> (ci_low[i], ci_high[i]) elseif error_style == :bars