From 11560bc27e03eb586099b0d36da5dbf4451c8d97 Mon Sep 17 00:00:00 2001 From: Jonathan Fischer Date: Tue, 28 May 2024 13:08:32 -0400 Subject: [PATCH] Update `Makie` plot recipe kwargs for `EnsembleSummary` `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. --- ext/SciMLBaseMakieExt.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/SciMLBaseMakieExt.jl b/ext/SciMLBaseMakieExt.jl index 24c6e2c21..65acbe2c8 100644 --- a/ext/SciMLBaseMakieExt.jl +++ b/ext/SciMLBaseMakieExt.jl @@ -344,7 +344,7 @@ end # TODO: should `error_style` be Makie plot types instead? I.e. `Band`, `Errorbar`, etc function Makie.convert_arguments(::Type{<:Lines}, sim::SciMLBase.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, kwargs...) @@ -384,7 +384,7 @@ function Makie.convert_arguments(::Type{<:Lines}, makie_plotlist = Makie.PlotSpec[] - for (count, idx) in enumerate(trajectories) + for (count, idx) in enumerate(idxs) push!(makie_plotlist, S.Lines(sim.t, u[idx]; color = Makie.Cycled(count), label = "u[$idx]")) if error_style == :ribbon