You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like the arrowcolor is not updated when the arrows change / update.
MWE:
Consider the following example based on the arrowsdocs
using WGLMakie
f =Figure(resolution = (800, 800))
Axis(f[1, 1], backgroundcolor ="black")
xs =LinRange(0, 2pi, 20)
ys =LinRange(0, 3pi, 20)
α =Node(0.3)
us =@lift [sin(x) *cos(y) *$α for x in xs, y in ys]
vs = [-cos(x) *sin(y) for x in xs, y in ys]
strength =@liftvec(sqrt.($us .^2.+ vs .^2))
arrows!(xs, ys, us, vs, arrowsize =10, lengthscale =0.3,
arrowcolor = strength, linecolor = strength)
f
Now if we update the arows
α[] =0.9
Now if we create the figure with α[] = 0.9 from the start
Versions:
Makie v0.15.0
WGLMakie v0.4.3
The text was updated successfully, but these errors were encountered:
It looks like problem is that color range is different for scatter and linesegments in WGLMakie.
MWE
using LinearAlgebra
α =Node(0.3)
pts =rand(Point2f0, 10)
lns =@liftmap(pts) do p
p =>Point2f0($α * p)
end
c =@lift$α .*norm.(pts)
f =Figure()
ax =Axis(f[1, 1])
scatter!(ax, pts, marker ='▲', color=c)
linesegments!(ax, lns, color=c)
f
Edit:
The MWE can be further simplified to
α =Node(0.5)
r =collect(1:4)
c =@lift$α .* r
f, ax, p =scatter(1:2:8, 1:2:8, color=c)
ls =linesegments!(1:8, 1:8, color=c)
Colorbar(f[1,2], p) # we can add colorbars to see the color range more clearlyColorbar(f[1,3], ls)
f
which when we do
α[] =0.1
results in scatter points to be in the high end of the color range which in turn indicates that the color values remained the same.
It looks like the
arrowcolor
is not updated when the arrows change / update.MWE:
Consider the following example based on the
arrows
docsNow if we update the arows
Now if we create the figure with
α[] = 0.9
from the startVersions:
Makie v0.15.0
WGLMakie v0.4.3
The text was updated successfully, but these errors were encountered: