JuliaDynamics / DynamicalSystems.jl

Award winning software library for nonlinear dynamics and nonlinear timeseries analysis
https://juliadynamics.github.io/DynamicalSystemsDocs.jl/dynamicalsystems/dev/
Other
822 stars 90 forks source link

Warning & Error when calling `interactive_orbitdiagram` #237

Open jonathanfischer97 opened 1 month ago

jonathanfischer97 commented 1 month ago

Problem

Calling interactive_orbitdiagram on a system ds first outputs this deprecation warning (just need to replace fig size kwarg):

┌ Warning: Found `resolution` in the theme when creating a `Scene`. The `resolution` keyword for `Scene`s and `Figure`s has been deprecated. Use `Figure(; size = ...` or `Scene(; size = ...)` instead, which better reflects that this is a unitless size and not a pixel resolution. The key could also come from `set_theme!` calls or related theming functions.
└ @ Makie ~/.julia/packages/Makie/We6MY/src/scenes.jl:227

Then it throws this error from Makie complaining about MakieLayout:

ERROR: UndefVarError: `MakieLayout` not defined
Stacktrace:
 [1] interactive_orbitdiagram(ds::CoupledODEs{…}, p_index::Int64, p_min::Float64, p_max::Float64, i0::Int64; u0::Nothing, parname::String, title::String)
   @ DynamicalSystemsVisualizations ~/.julia/packages/DynamicalSystems/Ndx8B/ext/src/orbitdiagram.jl:43
 [2] interactive_orbitdiagram
   @ ~/.julia/packages/DynamicalSystems/Ndx8B/ext/src/orbitdiagram.jl:3 [inlined]
 [3] interactive_orbitdiagram(ds::CoupledODEs{…}, p_index::Int64, p_min::Float64, p_max::Float64)
   @ DynamicalSystemsVisualizations ~/.julia/packages/DynamicalSystems/Ndx8B/ext/src/orbitdiagram.jl:3
 [4] top-level scope
   @ /home/jfisch27/Desktop/ThesisStuff/GeometricallyTunableOscillator/scripts/local/plotting/LEARN.jl:120
Some type information was truncated. Use `show(err)` to see complete types.

I think Makie.jl has been making some big changes lately, so just need to adjust according to the new API I assume.

MRE

ps = Dict(
    1 => 1:0.1:30,
    2 => 10:0.1:50,
    3 => 1:0.01:10.0,
)
pnames = Dict(1 => "σ", 2 => "ρ", 3 => "β")

lims = ((-30, 30), (-30, 30), (0, 100))

ds = PredefinedDynamicalSystems.lorenz()

interactive_orbitdiagram(ds, 1, 1.0, 3.0)

Package versions

  [f3fd9213] Attractors v1.17.0
  [608a59af] ChaosTools v3.1.2
  [ab4b797d] ComplexityMeasures v3.4.3
  [5732040d] DelayEmbeddings v2.7.4
  [61744808] DynamicalSystems v3.3.14
  [6e36e845] DynamicalSystemsBase v3.8.3
  [4665ce21] FractalDimensions v1.8.1
  [31e2f376] PredefinedDynamicalSystems v1.2.0
  [639c3291] RecurrenceAnalysis v2.0.6
  [40b095a5] StateSpaceSets v1.4.6
  [c804724b] TimeseriesSurrogates v2.6.4
asinghvi17 commented 1 month ago

What's your Makie version? MakieLayout was deprecated a long time ago...

jonathanfischer97 commented 1 month ago

Package versions

  [13f3f980] CairoMakie v0.12.2
  [61744808] DynamicalSystems v3.3.14
  [e9467ef8] GLMakie v0.10.2
  [ee78f7c6] Makie v0.21.2
  [20f20a25] MakieCore v0.8.2

System info

julia> versioninfo()
Julia Version 1.10.3
Commit 0b4590a5507 (2024-04-30 10:59 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 36 × Intel(R) Core(TM) i9-10980XE CPU @ 3.00GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, cascadelake)
Threads: 18 default, 0 interactive, 9 GC (on 36 virtual cores)
Environment:
  LD_LIBRARY_PATH = /tmp/.mount_cursorHMYEzR/usr/lib:
  JULIA_NUM_THREADS = 18
  JULIA_EDITOR = code
Datseris commented 1 month ago

Right, these are the latest stable versions. This is most likely a problem in interactive_orbitdiagram source code. Likely it hasn't been updated in a long time and it is using old and/or deprecated Makie syntax.

I am well outside capacity to fix this so pull requests are very welcomed!