Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass on idxs keyword argument from ensemble plots #493

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
ChrisRackauckas marked this conversation as resolved.
Show resolved Hide resolved
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
ChrisRackauckas marked this conversation as resolved.
Show resolved Hide resolved
end
if error_style == :ribbon
ribbon --> (ci_low[i], ci_high[i])
elseif error_style == :bars
Expand Down
Loading