Skip to content

Commit

Permalink
Fix EnsembleSummary plot recipe idxs kwarg
Browse files Browse the repository at this point in the history
`EnsembleSummary`'s plot recipe refered to the variable indices as `trajectories`, likely typo from the `EnsembleSimulation` recipe above where that nomenclature made sense. 

Fixed it to use `idxs`, allowing users to select which variables to plot the summaries of, in line with the documentation.
  • Loading branch information
jonathanfischer97 authored May 28, 2024
1 parent f2a9b0c commit bbdd876
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ensemble/ensemble_solutions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ end
end

@recipe function f(sim::EnsembleSummary;
trajectories = sim.u.u[1] isa AbstractArray ? eachindex(sim.u.u[1]) :
idxs = sim.u.u[1] isa AbstractArray ? eachindex(sim.u.u[1]) :
1,
error_style = :ribbon, ci_type = :quantile)
if ci_type == :SEM
Expand Down Expand Up @@ -192,7 +192,7 @@ end
else
error("ci_type choice not valid. Must be `:SEM` or `:quantile`")
end
for i in trajectories
for i in idxs
@series begin
legend --> false
linewidth --> 3
Expand Down

0 comments on commit bbdd876

Please sign in to comment.