You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using ODEFunction in combination with the keyword 'syms' when creating a ODEProblem leads to a MethodError when plotting the solution. This also fails when using the 'idxs' keyword in the 'plot' call.
Indexing the solution object using the 'syms' still works.
Expected behavior
Plot of the full solution (or parts when using 'idxs') with labels set to the provided symbols set in the 'ODEFunction' call.
Minimal Reproducible Example 👇
using Plots
using DifferentialEquations
functiontest!(du, u, p, t)
du[1] = u[1]
du[2] = u[2]
nothingend
func =ODEFunction(test!, syms=[:x, :y])
prob =ODEProblem(func, [0, 0], (0.0, 10.0), ())
sol =solve(prob)
x = sol[:x]
y = sol[:y]
plot(sol)
plot(sol, idxs=1)
plot(sol, idxs=:x)
Describe the bug 🐞
Using ODEFunction in combination with the keyword 'syms' when creating a ODEProblem leads to a MethodError when plotting the solution. This also fails when using the 'idxs' keyword in the 'plot' call.
Indexing the solution object using the 'syms' still works.
Expected behavior
Plot of the full solution (or parts when using 'idxs') with labels set to the provided symbols set in the 'ODEFunction' call.
Minimal Reproducible Example 👇
Error & Stacktrace⚠️
Environment (please complete the following information):
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()
The text was updated successfully, but these errors were encountered: