DifferentialEquations.jl icon indicating copy to clipboard operation
DifferentialEquations.jl copied to clipboard

Ensemble plot, single component

Open knappa opened this issue 2 years ago • 3 comments

It's conceivable that I'm just confused, but I've been trying to plot a single component of an EnsembleSummary for 18 dimensional SDE following the documentation here: https://docs.sciml.ai/DiffEqDocs/stable/features/ensemble/#Example-4:-Using-the-Analysis-Tools where it says:

Since there are 8 components to the differential equation, this can get messy, so let's only plot the 3rd component:

using Plots;
plot(summ; idxs = 3);

However, both the example plot in the documentation and the result in my own code display all of the components. (The components of my SDE are at different scales, so a co-mingled plot isn't very useful.)

knappa avatar Aug 16 '23 15:08 knappa

I think there is currently a bug in the plot recipe that needs to be handled.

ChrisRackauckas avatar Aug 17 '23 03:08 ChrisRackauckas

I'm a julia neophyte, but I'd be happy to look into fixing this bug myself if given a little direction.

knappa avatar Aug 23 '23 15:08 knappa

Ref https://github.com/SciML/DiffEqDocs.jl/pull/683.

idxs is the thing in the individual plot recipe https://github.com/SciML/SciMLBase.jl/blob/master/src/solutions/solution_interface.jl#L247

The ensemble plot recipe is here: https://github.com/SciML/SciMLBase.jl/blob/master/src/ensemble/ensemble_solutions.jl#L157.

I believe this should do it: https://github.com/SciML/SciMLBase.jl/pull/493

If you or @ErikQQY can test it out that would be great.

ChrisRackauckas avatar Sep 14 '23 11:09 ChrisRackauckas