Skip to content

Commit b9aea2e

Browse files
authored
Integrating Agents.jl with DifferentialEquations.jl Makie Figure call uses resolution over size (#1134)
* Update diffeq.jl Updated link to fixed SciML integrator interface * Update resolution to size for makie Figure call diffeq.jl
1 parent 9050444 commit b9aea2e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/diffeq.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Random.seed!(6549) #hide
106106
model = initialise()
107107
_, results = run!(model, 20; mdata = [:stock])
108108

109-
f = Figure(resolution = (600, 400))
109+
f = Figure(size = (600, 400))
110110
ax = f[1, 1] = Axis(
111111
f,
112112
xlabel = "Year",
@@ -180,7 +180,7 @@ model = initialise()
180180
yearly(model, s) = s % 365 == 0
181181
_, results = run!(model, 20 * 365; mdata = [:stock], when = yearly)
182182

183-
f = Figure(resolution = (600, 400))
183+
f = Figure(size = (600, 400))
184184
ax =
185185
f[1, 1] = Axis(
186186
f,
@@ -294,7 +294,7 @@ Random.seed!(6549) #hide
294294
modeldeq = initialise_diffeq()
295295
_, resultsdeq = run!(modeldeq, 20; mdata = [:stock])
296296

297-
f = Figure(resolution = (600, 400))
297+
f = Figure(size = (600, 400))
298298
ax = f[1, 1] = Axis(
299299
f,
300300
xlabel = "Year",
@@ -327,7 +327,7 @@ length(modeldeq.i.sol.t)
327327
# Compare our two results directly, both start with the same random seed and evolve in
328328
# precisely the same manner:
329329

330-
f = Figure(resolution = (600, 400))
330+
f = Figure(size = (600, 400))
331331
ax =
332332
f[1, 1] = Axis(
333333
f,
@@ -405,7 +405,7 @@ sol = OrdinaryDiffEq.solve(
405405
callback = OrdinaryDiffEq.CallbackSet(fish, reset),
406406
)
407407
discrete = vcat(sol(0:365:(365 * 20))[:,:]...)
408-
f = Figure(resolution = (600, 400))
408+
f = Figure(size = (600, 400))
409409
ax = f[1, 1] = Axis(
410410
f,
411411
xlabel = "Year",

0 commit comments

Comments
 (0)