juliamakie.jl

arrows2d function unavailable in CairoMakie


I am trying to run the following code in Jupyter notebook:

f = Figure(size = (800, 800))
Axis(f[1, 1], backgroundcolor = "black")

xs = LinRange(0, 2pi, 20)
ys = LinRange(0, 3pi, 20)
us = [sin(x) * cos(y) for x in xs, y in ys]
vs = [-cos(x) * sin(y) for x in xs, y in ys]
strength = vec(sqrt.(us .^ 2 .+ vs .^ 2))

arrows2d!(xs, ys, us, vs, lengthscale = 0.2, color = strength)

f

Which is a direct copy paste of the code in the documentation: https://docs.makie.org/dev/reference/plots/arrows

I however get an error UndefVarError: `arrows2d!` not defined in `Main`

Did the command change names?


Solution

  • The command is indeed now just named arrows