Hi everyone,
I’m trying to make a particle tracking animation of a flow field with Makie. One thing I observed was an “artifact” when the scatter dots move away from the camera. Then they’re surrounded by a small white stroke, rendering many dots next to each other almost invisible to the eye. I attached a video to try to make my point. I hope it’s visible. Is there any easy way to turn this off? If a minimal working example helps, I can attach it later.
I am using Makie and plotting with
scene = scatter(x_,y_,z_,color=c_,markersize=10*s_[:],show_axis=true, strokewidth=0)
where x_,y_,z_,c_ are Node’s that modify the scene for the animation.
Nice plot!
I think you pretty much have two options right now:
use meshscatter(shading=false) so it looks like flat circles (will be slower but should be still plenty fast)
use transparency=true… but that may introduce other artifacts like particles in the background rendering over particles in the foreground (it assumes that everything is transparent, so if it’s opaque it doesn’t work that well).
ERROR: There was no `AbstractPlotting.convert_arguments` overload found for
the plot type Combined{AbstractPlotting.meshscatter,Tuple{}}, or its conversion trait AbstractPlotting.PointBased().
The arguments were:
()
To fix this, define `AbstractPlotting.convert_arguments(::Combined{AbstractPlotting.meshscatter,Tuple{}}, )`.
I’m using [537997a7] AbstractPlotting v0.12.18, [ee78f7c6] Makie v0.11.1 and Julia v1.5.2.
Option 2 works fine, but it does show the particles in the background over those in the foreground, as you said !
I was just curious of how to make an animation as he showed and do it properly, i.e. not calling meshscatter all the times, but updating the underlying data if it makes sense?
I see now that he also used scatter instead of meshscatter, so perhaps that is the difference
Hi, I use Nodes to udpate the plot, something like so:
r = [Node{Vector{Point3{Float64}}}(Point3.(rand(3)) for i=1:n_points]
meshcatter!(scene, r)
for i=1:n_time
r[] = r[] .+ [Point3.(randn(3)/20) for i=1:n_points] #updates the Node
sleep(0.02) #give the plot some time to display.
end