From 3bd721112debaf6ed786850028dd69a39af66ae8 Mon Sep 17 00:00:00 2001 From: Patrick Kofod Mogensen Date: Wed, 12 Nov 2025 06:51:05 +0100 Subject: [PATCH 01/17] Support CairoMakie above 0.13 I suppose the restriction is just there because these are breaking changes due to sub 1.0 minor changes. --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index b831249319..289410d565 100644 --- a/Project.toml +++ b/Project.toml @@ -46,7 +46,7 @@ CatalystStructuralIdentifiabilityExtension = "StructuralIdentifiability" [compat] BifurcationKit = "0.4.4" -CairoMakie = "0.12, 0.13" +CairoMakie = "0.12, 0.13, 0.14, 0.15" Combinatorics = "1.0.2" DataStructures = "0.18, 0.19" DiffEqBase = "6.165.0" From b271c299f4316d88a0435af82bde8cae4b91b944 Mon Sep 17 00:00:00 2001 From: Patrick Kofod Mogensen Date: Wed, 12 Nov 2025 11:38:23 +0100 Subject: [PATCH 02/17] Update Project.toml --- Project.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 289410d565..56e9d3b158 100644 --- a/Project.toml +++ b/Project.toml @@ -54,14 +54,14 @@ DocStringExtensions = "0.8, 0.9" DynamicPolynomials = "0.6" DynamicQuantities = "1" EnumX = "1" -GraphMakie = "0.5" +GraphMakie = "0.6" Graphs = "1.4" HomotopyContinuation = "2.9" JumpProcesses = "9.13.2" LaTeXStrings = "1.3.0" Latexify = "0.16.6" MacroTools = "0.5.5" -Makie = "0.22.1" +Makie = "0.24" ModelingToolkit = "9.73" NetworkLayout = "0.4.7" Parameters = "0.12" From 458f58910c0c562f029ff2d725b54790e73d6026 Mon Sep 17 00:00:00 2001 From: Sam Isaacson Date: Thu, 27 Nov 2025 20:20:15 -0500 Subject: [PATCH 03/17] Bump doc compats Bump doc compats --- Project.toml | 2 +- docs/Project.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index 09287b87fc..ee35d32dea 100644 --- a/Project.toml +++ b/Project.toml @@ -46,7 +46,7 @@ CatalystStructuralIdentifiabilityExtension = "StructuralIdentifiability" [compat] BifurcationKit = "0.4.4" -CairoMakie = "0.12, 0.13, 0.14, 0.15" +CairoMakie = "0.15" Combinatorics = "1.0.2" DataStructures = "0.18, 0.19" DiffEqBase = "6.165.0" diff --git a/docs/Project.toml b/docs/Project.toml index 11013062d8..1856edebe0 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -50,7 +50,7 @@ Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" [compat] BenchmarkTools = "1.5" BifurcationKit = "0.4.17" -CairoMakie = "0.12, 0.13" +CairoMakie = "0.15" Catalyst = "15" DataFrames = "1.6" DataInterpolations = "7.2, 8" @@ -60,7 +60,7 @@ Documenter = "1.11.1" DynamicalSystems = "3.3" FiniteStateProjection = "0.3.2" GlobalSensitivity = "2.6" -GraphMakie = "0.5" +GraphMakie = "0.6" Graphs = "1.11.1" HomotopyContinuation = "2.9" IncompleteLU = "0.2" From 87809ab024a0f23f5612a91a9c44796a5733c9f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20M=C3=BCller-Widmann?= Date: Fri, 28 Nov 2025 08:50:25 +0100 Subject: [PATCH 04/17] Test with BifurcationKit@0.4.18 --- Project.toml | 3 +++ docs/Project.toml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Project.toml b/Project.toml index ee35d32dea..b5785686e2 100644 --- a/Project.toml +++ b/Project.toml @@ -101,3 +101,6 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] test = ["DataInterpolations", "DiffEqCallbacks", "DomainSets", "Logging", "NonlinearSolve", "OrdinaryDiffEqBDF", "OrdinaryDiffEqDefault", "OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqTsit5", "OrdinaryDiffEqVerner", "Pkg", "Plots", "Random", "SafeTestsets", "StableRNGs", "StaticArrays", "Statistics", "SteadyStateDiffEq", "StochasticDiffEq", "Test"] + +[sources] +BifurcationKit = { url = "https://github.com/devmotion/BifurcationKit.jl.git", rev = "dmw/backport_makie" } diff --git a/docs/Project.toml b/docs/Project.toml index 1856edebe0..0913d37dc2 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -94,3 +94,6 @@ SteadyStateDiffEq = "2.2" StochasticDiffEq = "6.65" StructuralIdentifiability = "0.5.11" Symbolics = "6.22" + +[sources] +BifurcationKit = { url = "https://github.com/devmotion/BifurcationKit.jl.git", rev = "dmw/backport_makie" } From dd919703f8653105c4a792158fe9a06393e688b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20M=C3=BCller-Widmann?= Date: Fri, 28 Nov 2025 08:53:24 +0100 Subject: [PATCH 05/17] Move `[sources]` to test/extensions/Project.toml --- docs/Project.toml | 3 --- test/extensions/Project.toml | 5 ++++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/Project.toml b/docs/Project.toml index 0913d37dc2..1856edebe0 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -94,6 +94,3 @@ SteadyStateDiffEq = "2.2" StochasticDiffEq = "6.65" StructuralIdentifiability = "0.5.11" Symbolics = "6.22" - -[sources] -BifurcationKit = { url = "https://github.com/devmotion/BifurcationKit.jl.git", rev = "dmw/backport_makie" } diff --git a/test/extensions/Project.toml b/test/extensions/Project.toml index 6e7773c76d..602a514907 100644 --- a/test/extensions/Project.toml +++ b/test/extensions/Project.toml @@ -10,4 +10,7 @@ ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" OrdinaryDiffEqDefault = "50262376-6c5a-4cf5-baba-aaf4f84d72d7" OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a" SteadyStateDiffEq = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f" -StructuralIdentifiability = "220ca800-aa68-49bb-acd8-6037fa93a544" \ No newline at end of file +StructuralIdentifiability = "220ca800-aa68-49bb-acd8-6037fa93a544" + +[sources] +BifurcationKit = { url = "https://github.com/devmotion/BifurcationKit.jl.git", rev = "dmw/backport_makie" } From 40f53b89e39aaede89e862e324672a2ba3c5f20a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20M=C3=BCller-Widmann?= Date: Fri, 28 Nov 2025 08:57:23 +0100 Subject: [PATCH 06/17] Fix Project.toml --- Project.toml | 3 --- docs/Project.toml | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index b5785686e2..ee35d32dea 100644 --- a/Project.toml +++ b/Project.toml @@ -101,6 +101,3 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] test = ["DataInterpolations", "DiffEqCallbacks", "DomainSets", "Logging", "NonlinearSolve", "OrdinaryDiffEqBDF", "OrdinaryDiffEqDefault", "OrdinaryDiffEqRosenbrock", "OrdinaryDiffEqTsit5", "OrdinaryDiffEqVerner", "Pkg", "Plots", "Random", "SafeTestsets", "StableRNGs", "StaticArrays", "Statistics", "SteadyStateDiffEq", "StochasticDiffEq", "Test"] - -[sources] -BifurcationKit = { url = "https://github.com/devmotion/BifurcationKit.jl.git", rev = "dmw/backport_makie" } diff --git a/docs/Project.toml b/docs/Project.toml index 1856edebe0..0913d37dc2 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -94,3 +94,6 @@ SteadyStateDiffEq = "2.2" StochasticDiffEq = "6.65" StructuralIdentifiability = "0.5.11" Symbolics = "6.22" + +[sources] +BifurcationKit = { url = "https://github.com/devmotion/BifurcationKit.jl.git", rev = "dmw/backport_makie" } From ef6e15048e7337eb9a82635f27dae5c37025de30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20M=C3=BCller-Widmann?= Date: Fri, 28 Nov 2025 11:00:57 +0100 Subject: [PATCH 07/17] Remove edge attributes if `show_rate_labels = false` --- .../rn_graph_plot.jl | 56 +++++++++++-------- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/ext/CatalystGraphMakieExtension/rn_graph_plot.jl b/ext/CatalystGraphMakieExtension/rn_graph_plot.jl index eef6a2cf75..91b1dc4f35 100644 --- a/ext/CatalystGraphMakieExtension/rn_graph_plot.jl +++ b/ext/CatalystGraphMakieExtension/rn_graph_plot.jl @@ -232,18 +232,9 @@ with the rate constant for the reaction. For a list of accepted keyword arguments to the graph plot, please see the [GraphMakie documentation](https://graph.makie.org/stable/#The-graphplot-Recipe). """ -function Catalyst.plot_complexes(rn::ReactionSystem; show_rate_labels = false, kwargs...) +function Catalyst.plot_complexes(rn::ReactionSystem; show_rate_labels::Bool = false, kwargs...) rxs = reactions(rn) specs = species(rn) - edgecolors = [:black for i in 1:length(rxs)] - edgelabels = [repr(rx.rate) for rx in rxs] - - deps = Set() - for (i, rx) in enumerate(rxs) - empty!(deps) - get_variables!(deps, rx.rate, specs) - (!isempty(deps)) && (edgecolors[i] = :red) - end # Get complex graph and reaction order for edgecolors and edgelabels. rxorder gives the order of reactions(rn) that would match the edge order in edges(cg). cg, rxorder = ComplexGraphWrap(rn) @@ -251,18 +242,39 @@ function Catalyst.plot_complexes(rn::ReactionSystem; show_rate_labels = false, k layout = if !haskey(kwargs, :layout) Stress() end - f = graphplot(cg; - layout, - edge_color = edgecolors[rxorder], - elabels = show_rate_labels ? edgelabels[rxorder] : [], - ilabels = complexlabels(rn), - node_color = :skyblue3, - elabels_rotation = 0, - arrow_shift = :end, - curve_distance_usage = true, - curve_distance = gen_distances(cg), - kwargs... - ) + + if show_rate_labels + edgelabels = [repr(rxs[i].rate) for i in rxorder] + deps = Set() + edgecolors = map(rxorder) do i + empty!(deps) + get_variables!(deps, rxs[i].rate, specs) + return isempty(deps) ? :black : :red + end + + f = graphplot(cg; + layout, + edge_color = edgecolors, + elabels = edgelabels, + ilabels = complexlabels(rn), + node_color = :skyblue3, + elabels_rotation = 0, + arrow_shift = :end, + curve_distance_usage = true, + curve_distance = gen_distances(cg), + kwargs... + ) + else + f = graphplot(cg; + layout, + ilabels = complexlabels(rn), + node_color = :skyblue3, + arrow_shift = :end, + curve_distance_usage = true, + curve_distance = gen_distances(cg), + kwargs... + ) + end f.axis.xautolimitmargin = (0.15, 0.15) f.axis.yautolimitmargin = (0.15, 0.15) From a09d69b273c54f41432944ffdc1a85e37fa96568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20M=C3=BCller-Widmann?= Date: Fri, 28 Nov 2025 13:02:45 +0100 Subject: [PATCH 08/17] Try to use `Observable`s --- ...cairo_makie_extension_spatial_modelling.jl | 22 ++++++++++--------- ...graph_makie_extension_spatial_modelling.jl | 10 +++++---- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/ext/CatalystCairoMakieExtension/cairo_makie_extension_spatial_modelling.jl b/ext/CatalystCairoMakieExtension/cairo_makie_extension_spatial_modelling.jl index d533c44dcb..69432bfeb8 100644 --- a/ext/CatalystCairoMakieExtension/cairo_makie_extension_spatial_modelling.jl +++ b/ext/CatalystCairoMakieExtension/cairo_makie_extension_spatial_modelling.jl @@ -24,18 +24,18 @@ function lattice_animation( vals, plot_min, plot_max = Catalyst.extract_vals(sol, sp, lrs, plot_min, plot_max, t) # Creates the base figure (which is modified in the animation). - fig, ax, plt = scatterlines(vals[1]; + frame = Makie.Observable(i) + fig, ax, plt = scatterlines(Makie.@lift(vals[$frame]); axis = (xlabel = "Compartment", ylabel = "$(sp)", limits = (nothing, nothing, plot_min, plot_max)), markersize = markersize, kwargs...) - ttitle && (ax.title = "Time: $(round(t[1]; sigdigits = 3))") + if ttile + ax.title = Makie.@lift(string("Time: ", round(t[$frame]; sigdigits = 3))) + end # Creates the animation. record(fig, filename, 1:1:nframes; framerate) do i - for vertex in 1:grid_size(lrs)[1] - plt[1].val[vertex] = [vertex, vals[i][vertex]] - end - ttitle && (ax.title = "Time: $(round(t[i]; sigdigits = 3))") + frame[] = i end return nothing end @@ -100,17 +100,19 @@ function lattice_animation( x_vals, y_vals = Catalyst.extract_grid_axes(lrs) # Creates the base figure (which is modified in the animation). - fig, ax, hm = heatmap(x_vals, y_vals, vals[1]; + frame = Makie.Observable(1) + fig, ax, hm = heatmap(x_vals, y_vals, Makie.@lift(vals[$frame]); axis = (xgridvisible = false, ygridvisible = false, xlabel = "Compartment", ylabel = "Compartment"), colormap, colorrange = (plot_min, plot_max), kwargs...) - ttitle && (ax.title = "Time: $(round(t[1]; sigdigits = 3))") + if ttitle + ax.title = Makie.@lift(string("Time: ", round(t[$frame]; sigdigits = 3))) + end # Creates the animation. record(fig, filename, 1:1:nframes; framerate) do i - ttitle && (ax.title = "Time: $(round(t[i]; sigdigits = 3))") - hm[3] = vals[i] + frame[] = i end return nothing end diff --git a/ext/CatalystGraphMakieExtension/graph_makie_extension_spatial_modelling.jl b/ext/CatalystGraphMakieExtension/graph_makie_extension_spatial_modelling.jl index fb854d5b1e..24d4d119ef 100644 --- a/ext/CatalystGraphMakieExtension/graph_makie_extension_spatial_modelling.jl +++ b/ext/CatalystGraphMakieExtension/graph_makie_extension_spatial_modelling.jl @@ -27,14 +27,16 @@ function lattice_animation( vals, plot_min, plot_max = Catalyst.extract_vals(sol, sp, lrs, plot_min, plot_max, t) # Creates the base figure (which is modified in the animation). - fig, ax, plt = graphplot(plot_graph; node_color = vals[1], + frame = Makie.Observable(1) + fig, ax, plt = graphplot(plot_graph; node_color = Makie.@lift(vals[$frame]), node_attr = (colorrange = (plot_min, plot_max), colormap), node_size, kwargs...) - ttitle && (ax.title = "Time: $(round(t[1]; sigdigits = 3))") + if ttitle + ax.title = Makie.@lift(string("Time: ", round(t[$frame]; sigdigits = 3))) + end # Creates the animation. GraphMakie.record(fig, filename, 1:1:nframes; framerate) do i - plt.node_color = vals[i] - ttitle && (ax.title = "Time: $(round(t[i]; sigdigits = 3))") + frame[] = i end return nothing end From dc85702a06de80c8cae1d288630b4079299aebf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20M=C3=BCller-Widmann?= Date: Fri, 28 Nov 2025 13:19:37 +0100 Subject: [PATCH 09/17] Remove invalid tests --- test/extensions/lattice_simulation_plotting.jl | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/test/extensions/lattice_simulation_plotting.jl b/test/extensions/lattice_simulation_plotting.jl index b26d2be287..ad58a928f4 100644 --- a/test/extensions/lattice_simulation_plotting.jl +++ b/test/extensions/lattice_simulation_plotting.jl @@ -31,18 +31,16 @@ let jsol = solve(jprob, SSAStepper()) for sol in [osol, jsol] - # Plots the simulation and checks that a stored value is correct. + # Plots the simulation fig, ax, plt = lattice_plot(sol, :X, lrs; t = 1.0) - @test plt[1].val[1][2] ≈ sol.u[end][1] # Attempts to animate the simulation (using various arguments). Deletes the saved file. lattice_animation(sol, :X, lrs, "animation_tmp.mp4"; nframes = 10, framerate = 10, colormap = :BuGn_6) @test isfile("animation_tmp.mp4") rm("animation_tmp.mp4") - # Plots the kymograph and checks that a stored value is correct. + # Plots the kymograph fig, ax, hm = lattice_kymograph(sol, :X, lrs) - hm[3].val[end,1] ≈ sol.u[end][1] end end end @@ -71,9 +69,8 @@ let jsol = solve(jprob, SSAStepper()) for sol in [osol, jsol] - # Plots the simulation and checks that a stored value is correct. + # Plots the simulation fig, ax, hm = lattice_plot(sol, :X, lrs; t = 1.0) - @test hm[3].val[1] ≈ sol.u[end][1] # Attempts to animate the simulation (using various arguments). Deletes the saved file. lattice_animation(sol, :X, lrs, "animation_tmp.mp4"; nframes = 10, framerate = 10, colormap = :BuGn_6) @@ -122,9 +119,8 @@ let jsol = solve(jprob, SSAStepper()) for sol in [osol, jsol] - # Plots the simulation and checks that a stored value is correct. + # Plots the simulation fig, ax, plt = lattice_plot(sol, :X, lrs; t = 0.0) - @test plt.node_color[] == osol.u[1] # Attempts to animate the simulation (using various arguments). Deletes the saved file. lattice_animation(sol, :X, lrs, "animation_tmp.mp4"; nframes = 10, framerate = 10, colormap = :BuGn_6) From bd4a7ac9a0f6c1fe07fbbe4e0b7169c0e08cee4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20M=C3=BCller-Widmann?= Date: Fri, 28 Nov 2025 14:51:46 +0100 Subject: [PATCH 10/17] Try something else --- ...cairo_makie_extension_spatial_modelling.jl | 34 +++++++++++++------ ...graph_makie_extension_spatial_modelling.jl | 12 ++++--- 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/ext/CatalystCairoMakieExtension/cairo_makie_extension_spatial_modelling.jl b/ext/CatalystCairoMakieExtension/cairo_makie_extension_spatial_modelling.jl index 69432bfeb8..f10c021190 100644 --- a/ext/CatalystCairoMakieExtension/cairo_makie_extension_spatial_modelling.jl +++ b/ext/CatalystCairoMakieExtension/cairo_makie_extension_spatial_modelling.jl @@ -25,13 +25,19 @@ function lattice_animation( # Creates the base figure (which is modified in the animation). frame = Makie.Observable(i) + axis_kwargs = (; + xlabel = "Compartment", ylabel = string(sp), + limits = (nothing, nothing, plot_min, plot_max), + ) + if ttitle + axis_kwargs = merge( + axis_kwargs, + (; title = Makie.@lift(string("Time: ", round(t[$frame]; sigdigits = 3)))), + ) + end fig, ax, plt = scatterlines(Makie.@lift(vals[$frame]); - axis = (xlabel = "Compartment", ylabel = "$(sp)", - limits = (nothing, nothing, plot_min, plot_max)), + axis = axis_kwargs, markersize = markersize, kwargs...) - if ttile - ax.title = Makie.@lift(string("Time: ", round(t[$frame]; sigdigits = 3))) - end # Creates the animation. record(fig, filename, 1:1:nframes; framerate) do i @@ -92,7 +98,7 @@ function lattice_animation( sol, sp, lrs::LatticeReactionSystem{Q, R, <:Catalyst.GridLattice{2, S}, T}, filename::String; colormap = :BuGn_7, nframes = 200, framerate = 20, plot_min = nothing, - plot_max = nothing, ttitle = true, kwargs...) where {Q, R, S, T} + plot_max = nothing, ttitle::Bool = true, kwargs...) where {Q, R, S, T} # Prepares the inputs to the figure. t = LinRange(sol.prob.tspan[1], sol.prob.tspan[2], nframes) @@ -101,14 +107,20 @@ function lattice_animation( # Creates the base figure (which is modified in the animation). frame = Makie.Observable(1) + axis_kwargs = (; + xgridvisible = false, ygridvisible = false, + xlabel = "Compartment", ylabel = "Compartment", + ) + if ttitle + axis_kwargs = merge( + axis_kwargs, + (; title = Makie.@lift(string("Time: ", round(t[$frame]; sigdigits = 3)))), + ) + end fig, ax, hm = heatmap(x_vals, y_vals, Makie.@lift(vals[$frame]); - axis = (xgridvisible = false, ygridvisible = false, - xlabel = "Compartment", ylabel = "Compartment"), + axis = axis_kwargs, colormap, colorrange = (plot_min, plot_max), kwargs...) - if ttitle - ax.title = Makie.@lift(string("Time: ", round(t[$frame]; sigdigits = 3))) - end # Creates the animation. record(fig, filename, 1:1:nframes; framerate) do i diff --git a/ext/CatalystGraphMakieExtension/graph_makie_extension_spatial_modelling.jl b/ext/CatalystGraphMakieExtension/graph_makie_extension_spatial_modelling.jl index 24d4d119ef..cc4cf30c79 100644 --- a/ext/CatalystGraphMakieExtension/graph_makie_extension_spatial_modelling.jl +++ b/ext/CatalystGraphMakieExtension/graph_makie_extension_spatial_modelling.jl @@ -20,7 +20,7 @@ end function lattice_animation( sol, sp, lrs::LatticeReactionSystem{Q, R, <:AbstractGraph, T}, filename::String; t = sol.t[end], nframes = 200, framerate = 20, plot_min = nothing, plot_max = nothing, - colormap = :BuGn_7, node_size = 50, ttitle = true, kwargs...) where {Q, R, T} + colormap = :BuGn_7, node_size = 50, ttitle::Bool = true, kwargs...) where {Q, R, T} # Prepares the inputs to the figure. plot_graph = SimpleGraph(Catalyst.lattice(lrs)) t = LinRange(sol.prob.tspan[1], sol.prob.tspan[2], nframes) @@ -28,11 +28,13 @@ function lattice_animation( # Creates the base figure (which is modified in the animation). frame = Makie.Observable(1) - fig, ax, plt = graphplot(plot_graph; node_color = Makie.@lift(vals[$frame]), - node_attr = (colorrange = (plot_min, plot_max), colormap), node_size, kwargs...) - if ttitle - ax.title = Makie.@lift(string("Time: ", round(t[$frame]; sigdigits = 3))) + axis_kwarg = if ttitle + (; axis = (; title = Makie.@lift(string("Time: ", round(t[$frame]; sigdigits = 3))))) + else + (;) end + fig, ax, plt = graphplot(plot_graph; node_color = Makie.@lift(vals[$frame]), + node_attr = (colorrange = (plot_min, plot_max), colormap), node_size, axis_kwarg..., kwargs...) # Creates the animation. GraphMakie.record(fig, filename, 1:1:nframes; framerate) do i From 59a6d2635830662e3d24ffa033f010ba07cbe7a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20M=C3=BCller-Widmann?= Date: Fri, 28 Nov 2025 15:45:24 +0100 Subject: [PATCH 11/17] Fix typo --- .../cairo_makie_extension_spatial_modelling.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/CatalystCairoMakieExtension/cairo_makie_extension_spatial_modelling.jl b/ext/CatalystCairoMakieExtension/cairo_makie_extension_spatial_modelling.jl index f10c021190..32fbf67803 100644 --- a/ext/CatalystCairoMakieExtension/cairo_makie_extension_spatial_modelling.jl +++ b/ext/CatalystCairoMakieExtension/cairo_makie_extension_spatial_modelling.jl @@ -24,7 +24,7 @@ function lattice_animation( vals, plot_min, plot_max = Catalyst.extract_vals(sol, sp, lrs, plot_min, plot_max, t) # Creates the base figure (which is modified in the animation). - frame = Makie.Observable(i) + frame = Makie.Observable(1) axis_kwargs = (; xlabel = "Compartment", ylabel = string(sp), limits = (nothing, nothing, plot_min, plot_max), From b1f6e0e07cd5a7b57819c84eae9246327187b636 Mon Sep 17 00:00:00 2001 From: Sam Isaacson Date: Fri, 28 Nov 2025 12:06:04 -0500 Subject: [PATCH 12/17] Update Project.toml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: David Müller-Widmann --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index ee35d32dea..09287b87fc 100644 --- a/Project.toml +++ b/Project.toml @@ -46,7 +46,7 @@ CatalystStructuralIdentifiabilityExtension = "StructuralIdentifiability" [compat] BifurcationKit = "0.4.4" -CairoMakie = "0.15" +CairoMakie = "0.12, 0.13, 0.14, 0.15" Combinatorics = "1.0.2" DataStructures = "0.18, 0.19" DiffEqBase = "6.165.0" From 65e002004e20494ce488c721da85b9bdb7410870 Mon Sep 17 00:00:00 2001 From: Sam Isaacson Date: Fri, 28 Nov 2025 12:06:18 -0500 Subject: [PATCH 13/17] Update Project.toml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: David Müller-Widmann --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 09287b87fc..e2a56acf94 100644 --- a/Project.toml +++ b/Project.toml @@ -54,7 +54,7 @@ DocStringExtensions = "0.8, 0.9" DynamicPolynomials = "0.6" DynamicQuantities = "1" EnumX = "1" -GraphMakie = "0.6" +GraphMakie = "0.5, 0.6" Graphs = "1.4" HomotopyContinuation = "2.9" JumpProcesses = "9.19.2" From 56b66ca4119b9ceba5095112aed6d877821cd7ad Mon Sep 17 00:00:00 2001 From: Sam Isaacson Date: Fri, 28 Nov 2025 12:06:32 -0500 Subject: [PATCH 14/17] Update Project.toml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: David Müller-Widmann --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index e2a56acf94..1aad0c4bfd 100644 --- a/Project.toml +++ b/Project.toml @@ -61,7 +61,7 @@ JumpProcesses = "9.19.2" LaTeXStrings = "1.3.0" Latexify = "0.16.6" MacroTools = "0.5.5" -Makie = "0.24" +Makie = "0.22.1, 0.23, 0.24" ModelingToolkit = "9.73" NetworkLayout = "0.4.7" Parameters = "0.12" From 1b837e176576b568e7a3c798b4b6c62aee35c844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20M=C3=BCller-Widmann?= Date: Fri, 28 Nov 2025 20:07:38 +0100 Subject: [PATCH 15/17] Apply suggestions from code review --- test/extensions/lattice_simulation_plotting.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/extensions/lattice_simulation_plotting.jl b/test/extensions/lattice_simulation_plotting.jl index ad58a928f4..b54e88d0ce 100644 --- a/test/extensions/lattice_simulation_plotting.jl +++ b/test/extensions/lattice_simulation_plotting.jl @@ -31,7 +31,7 @@ let jsol = solve(jprob, SSAStepper()) for sol in [osol, jsol] - # Plots the simulation + # Plots the simulation and checks that a stored value is correct. fig, ax, plt = lattice_plot(sol, :X, lrs; t = 1.0) # Attempts to animate the simulation (using various arguments). Deletes the saved file. @@ -39,7 +39,7 @@ let @test isfile("animation_tmp.mp4") rm("animation_tmp.mp4") - # Plots the kymograph + # Plots the kymograph and checks that a stored value is correct. fig, ax, hm = lattice_kymograph(sol, :X, lrs) end end @@ -69,7 +69,7 @@ let jsol = solve(jprob, SSAStepper()) for sol in [osol, jsol] - # Plots the simulation + # Plots the simulation and checks that a stored value is correct. fig, ax, hm = lattice_plot(sol, :X, lrs; t = 1.0) # Attempts to animate the simulation (using various arguments). Deletes the saved file. @@ -119,7 +119,7 @@ let jsol = solve(jprob, SSAStepper()) for sol in [osol, jsol] - # Plots the simulation + # Plots the simulation and checks that a stored value is correct. fig, ax, plt = lattice_plot(sol, :X, lrs; t = 0.0) # Attempts to animate the simulation (using various arguments). Deletes the saved file. From 5bc392fd811202dd613bb569615101ade3eb084b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20M=C3=BCller-Widmann?= Date: Fri, 28 Nov 2025 21:31:23 +0100 Subject: [PATCH 16/17] Mark tests as broken --- docs/Project.toml | 3 --- test/extensions/Project.toml | 5 +---- test/extensions/lattice_simulation_plotting.jl | 3 +++ 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/docs/Project.toml b/docs/Project.toml index 0913d37dc2..1856edebe0 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -94,6 +94,3 @@ SteadyStateDiffEq = "2.2" StochasticDiffEq = "6.65" StructuralIdentifiability = "0.5.11" Symbolics = "6.22" - -[sources] -BifurcationKit = { url = "https://github.com/devmotion/BifurcationKit.jl.git", rev = "dmw/backport_makie" } diff --git a/test/extensions/Project.toml b/test/extensions/Project.toml index 602a514907..6e7773c76d 100644 --- a/test/extensions/Project.toml +++ b/test/extensions/Project.toml @@ -10,7 +10,4 @@ ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" OrdinaryDiffEqDefault = "50262376-6c5a-4cf5-baba-aaf4f84d72d7" OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a" SteadyStateDiffEq = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f" -StructuralIdentifiability = "220ca800-aa68-49bb-acd8-6037fa93a544" - -[sources] -BifurcationKit = { url = "https://github.com/devmotion/BifurcationKit.jl.git", rev = "dmw/backport_makie" } +StructuralIdentifiability = "220ca800-aa68-49bb-acd8-6037fa93a544" \ No newline at end of file diff --git a/test/extensions/lattice_simulation_plotting.jl b/test/extensions/lattice_simulation_plotting.jl index b54e88d0ce..857b328856 100644 --- a/test/extensions/lattice_simulation_plotting.jl +++ b/test/extensions/lattice_simulation_plotting.jl @@ -33,6 +33,7 @@ let for sol in [osol, jsol] # Plots the simulation and checks that a stored value is correct. fig, ax, plt = lattice_plot(sol, :X, lrs; t = 1.0) + @test_broken plt[1].val[1][2] ≈ sol.u[end][1] # Attempts to animate the simulation (using various arguments). Deletes the saved file. lattice_animation(sol, :X, lrs, "animation_tmp.mp4"; nframes = 10, framerate = 10, colormap = :BuGn_6) @@ -41,6 +42,7 @@ let # Plots the kymograph and checks that a stored value is correct. fig, ax, hm = lattice_kymograph(sol, :X, lrs) + @test_broken hm[3].val[end,1] ≈ sol.u[end][1] end end end @@ -121,6 +123,7 @@ let for sol in [osol, jsol] # Plots the simulation and checks that a stored value is correct. fig, ax, plt = lattice_plot(sol, :X, lrs; t = 0.0) + @test plt.node_color[] == osol.u[1] # Attempts to animate the simulation (using various arguments). Deletes the saved file. lattice_animation(sol, :X, lrs, "animation_tmp.mp4"; nframes = 10, framerate = 10, colormap = :BuGn_6) From 6dc2e41778e3fe9eed493fdf75342eda24c33b17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20M=C3=BCller-Widmann?= Date: Fri, 28 Nov 2025 22:58:16 +0100 Subject: [PATCH 17/17] Mark additional test as broken --- test/extensions/lattice_simulation_plotting.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/test/extensions/lattice_simulation_plotting.jl b/test/extensions/lattice_simulation_plotting.jl index 857b328856..babf1c9ecb 100644 --- a/test/extensions/lattice_simulation_plotting.jl +++ b/test/extensions/lattice_simulation_plotting.jl @@ -73,6 +73,7 @@ let for sol in [osol, jsol] # Plots the simulation and checks that a stored value is correct. fig, ax, hm = lattice_plot(sol, :X, lrs; t = 1.0) + @test_broken hm[3].val[1] ≈ sol.u[end][1] # Attempts to animate the simulation (using various arguments). Deletes the saved file. lattice_animation(sol, :X, lrs, "animation_tmp.mp4"; nframes = 10, framerate = 10, colormap = :BuGn_6)