Skip to content

MakieOutput Unknown error #248

@nicolasmerino41

Description

@nicolasmerino41

Hi,

I've been using MakieOutput and it works fine when used as the default visualisation (e.g.):

output = MakieOutput(
    reverse(init, dims=2);
    tspan = tspan, 
    ruleset = ruleset, 
    fps = 100) 

However, I cannot manage to make it work in the personalized fashion:

output = MakieOutput(init; tspan, ruleset) do layout, frame, t
      image!(Axis(layout[1, 1]), frame; interpolate=false, colormap=:inferno)
  end

I always get the same error:
ERROR: MethodError: no method matching (::var"#37#38")(::DynamicGridsMakieExt.MakieSim)

The stacktrace shows ::var"#37#38" is associated to the f:: keyword:

Stacktrace:

MakieOutput(; frames::Vector{…}, running::Bool, extent::Extent{…}, ruleset::Ruleset{…}, extrainit::Dict{…}, interactive::Bool, figure::Figure, layout::GridLayout, inputgrid::GridLayout, f::var"#37#38", graphicconfig::Nothing, simdata::Nothing, ncolumns::Int64, sim_kw::@NamedTuple{}, slider_kw::@NamedTuple{}, kw::Base.Pairs{…}) at DynamicGridsMakieExt.jl

I've found f to be f=_plot! by default but I don't know what other arguments it can take nor if the solution lies there.

Ps: I have tried the example in the documentation and it throws the exact same error so idk.
Here the example for ease:

ruleset = Ruleset(Life())
# And the time-span for it to run
tspan = 1:100
# Create our own plots with Makie.jl
output = MakieOutput(rand(Bool, 200, 300); tspan, ruleset) do layout, frame, t
    image!(Axis(layout[1, 1]), frame; interpolate=false, colormap=:inferno)
end

Thank you,
Nico

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions