I've been trying to plot a simple function:
v(x, y) = (y*t, 2*x*t)
(actual implementation: v(x::Point2{T}, t) where T = Point2{T}(one(T) * x[2] * t, 4 * x[1])
)
using Makie's 2D streamplot function.
While I can plot each timestep individually, by creating an anonymous function f = x -> v(x, 5e0)
(for example) and plotting f
, when I try to wrap it in an Observable (using Node(f)
), then I can no longer update that Observable to point to another function, so my record loop fails.
I've tried forcing the type of the Node to be more abstract (Node{Function}
). Unfortunately, this abstract type seems to get lost somewhere in the internals of Makie, and is thus lost.
Is there any way I could wrap my type, so as to not run into type conflicts, but still be a Function?