bifurcationkit / BifurcationKit.jl

A Julia package to perform Bifurcation Analysis
https://bifurcationkit.github.io/BifurcationKitDocs.jl/stable
Other
303 stars 37 forks source link

Problem with plotting a periodic orbit #146

Closed olivierfaugeras closed 6 months ago

olivierfaugeras commented 6 months ago

I have been successfully running the code in the documentation at https://bifurcationkit.github.io/BifurcationKitDocs.jl/dev/tutorials/ode/tutorialsODE/#Branch-of-periodic-orbits-with-Orthogonal-Collocation until I tried to visualise the periodic orbit with the following two lines

sol = get_periodic_orbit(br_pocoll, 100)
plot(sol, title = "Periodic orbit")

getting the following error message after trying to execute the plot command:

ERROR: Cannot convert BifurcationKit.SolPeriodicOrbit{Vector{Float64}, Base.ReshapedArray{Float64, 2, SubArray{Float64, 1, Vector{Float64}, Tuple{UnitRange{Int64}}, true}, Tuple{}}} to series data for plotting Stacktrace: [1] error(s::String) @ Base ./error.jl:35 [2] _prepare_series_data(x::BifurcationKit.SolPeriodicOrbit{Vector{…}, Base.ReshapedArray{…}}) @ RecipesPipeline ~/.julia/packages/RecipesPipeline/BGM3l/src/series.jl:8 [3] _series_data_vector(x::BifurcationKit.SolPeriodicOrbit{…}, plotattributes::Dict{…}) @ RecipesPipeline ~/.julia/packages/RecipesPipeline/BGM3l/src/series.jl:36 [4] macro expansion @ RecipesPipeline ~/.julia/packages/RecipesPipeline/BGM3l/src/series.jl:129 [inlined] [5] apply_recipe(plotattributes::AbstractDict{Symbol, Any}, ::Type{RecipesPipeline.SliceIt}, x::Any, y::Any, z::Any) @ RecipesPipeline ~/.julia/packages/RecipesBase/BRe07/src/RecipesBase.jl:300 [6] _process_userrecipes!(plt::Any, plotattributes::Any, args::Any) @ RecipesPipeline ~/.julia/packages/RecipesPipeline/BGM3l/src/user_recipe.jl:38 [7] recipe_pipeline!(plt::Any, plotattributes::Any, args::Any) @ RecipesPipeline ~/.julia/packages/RecipesPipeline/BGM3l/src/RecipesPipeline.jl:72 [8] _plot!(plt::Plots.Plot, plotattributes::Any, args::Any) @ Plots ~/.julia/packages/Plots/sxUvK/src/plot.jl:223 [9] plot(args::Any; kw...) @ Plots ~/.julia/packages/Plots/sxUvK/src/plot.jl:102 [10] top-level scope @ ~/Code/julia/bifurcationkit/neural-mass-equation.jl:73 Some type information was truncated. Useshow(err)to see complete types.

I did not change the values of the parameters.

Thanks for your help. Best, Olivier Faugeras

rveltz commented 6 months ago

Thank you for reporting this.

rveltz commented 6 months ago

It seems to be fixed on master.