Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions src/ensemble/ensemble_solutions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down