Open QiyaoWei opened 3 years ago
Yup it looks like this is only implemented for AbstractTimeseriesSolutions right now, so non-time series objects (steady states) are missing this plot. This needs to get fixed.
Hey Chris! Thanks a lot for the reply! As a follow-up to this question, I have tried directly copying and pasting the code in the last section "Plot Recipe" from (https://diffeq.sciml.ai/stable/basics/integrator/), and it still returns the same issue. I wonder if this is a package issue? I append the error and code here for completeness
ERROR: LoadError: MethodError: no method matching interpret_vars(::Nothing, ::ODESolution{Float64, 1, Vector{Float64}, Nothing, Nothing, Vector{Float64}, Vector{Vector{Float64}}, ODEProblem{Float64, Tuple{Float64, Float64}, false, SciMLBase.NullParameters, ODEFunction{false, var"#7#8", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Tsit5, OrdinaryDiffEq.InterpolationData{ODEFunction{false, var"#7#8", LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Float64}, Vector{Float64}, Vector{Vector{Float64}}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}}, DiffEqBase.DEStats})
Closest candidates are:
interpret_vars(::Any, ::Any, ::Any) at /Users/qiyaowei/.julia/packages/SciMLBase/UIp7W/src/solutions/solution_interface.jl:387
Stacktrace:
[1] macro expansion
@ ~/.julia/packages/SciMLBase/UIp7W/src/integrator_interface.jl:487 [inlined]
[2] apply_recipe(plotattributes::AbstractDict{Symbol, Any}, integrator::SciMLBase.DEIntegrator)
@ SciMLBase ~/.julia/packages/RecipesBase/3fzVq/src/RecipesBase.jl:283
[3] _process_userrecipes!(plt::Any, plotattributes::Any, args::Any)
@ RecipesPipeline ~/.julia/packages/RecipesPipeline/i2bA0/src/user_recipe.jl:36
[4] recipe_pipeline!(plt::Any, plotattributes::Any, args::Any)
@ RecipesPipeline ~/.julia/packages/RecipesPipeline/i2bA0/src/RecipesPipeline.jl:70
[5] _plot!(plt::Plots.Plot, plotattributes::Any, args::Any)
@ Plots ~/.julia/packages/Plots/Di0Qb/src/plot.jl:208
[6] plot(args::Any; kw::Any)
@ Plots ~/.julia/packages/Plots/Di0Qb/src/plot.jl:91
[7] plot(args::Any)
@ Plots ~/.julia/packages/Plots/Di0Qb/src/plot.jl:85
[8] top-level scope
@ ~/julia/test.jl:9
[9] include(fname::String)
@ Base.MainInclude ./client.jl:444
[10] top-level scope
@ none:1
in expression starting at /Users/qiyaowei/julia/test.jl:9
using DifferentialEquations, DiffEqProblemLibrary, Plots
# Linear ODE which starts at 0.5 and solves from t=0.0 to t=1.0
prob = ODEProblem((u,p,t)->1.01u,0.5,(0.0,1.0))
using Plots
integrator = init(prob,Tsit5();dt=1//2^(4),tstops=[0.5])
pyplot(show=true)
plot(integrator)
for i in integrator
display(plot!(integrator,vars=(0,1),legend=false))
end
step!(integrator); plot!(integrator,vars=(0,1),legend=false)
savefig("iteratorplot.png")
Hi all, I am trying to follow this tutorial to plot an integrator object (https://diffeq.sciml.ai/stable/basics/integrator/), but received the following error. For completeness, I also post the segment of code where I use the plot function. Any help is appreciated. Thanks a lot!