Open bjarthur opened 10 months ago
Oh yeah that's kind of the worst case scenario for GLMakie if you change markers all the time :) I should put a note in the scatter docs about this behavior. CairoMakie will not care if you can use that for your animation. Or you could use poly which doesn't use the atlas
any chance that you can just scale them via markersize=Vec(xscale, yscale), rotation=rad
?
When back at my PC I can also look at clearing the texture atlas in the most efficient way.. I guess the best would be to overwrite the same texture atlas slot for every frame
In theory, you could also pass your own signed distance field as a marker, which may be the preferred solution...one would just need to figure out the low level api to render the poly to a signed distance field
CairoMakie works! thanks. poly
would probably also work, but i didn't try it. might have used that from the start if i had known about it. my bad as it is documented.
I gave it a shot today, and the code path for passing an SDF directly is completely bitrotten :D
Maybe we need to introduce a DistanceField
type, and implement it accordingly for (W)GLMakie.
Hi,
I run into the same error while DIYing a way to individually scale the arrowheads in a quiver (arrows
) plot.
Since I couldn't find a way to do it, I ended up passing a matrix of individually scaled BezierCurves for each vector to arrows!
:
function scaled_bezier( scale, min_scale=0.1 )
s = max( scale, min_scale )
return BezierPath( [ Makie.MoveTo([0.0, 0.485 * s] ),
Makie.LineTo([-0.36375 * s, -0.24250000000000002 * s] ),
Makie.LineTo([0.36375 * s, -0.24250000000000002 * s] ),
Makie.ClosePath() ] )
end
arrowheads = Observable( scaled_bezier.( arrow_magnitudes, 0.1 ) )
[....]
Makie.arrows!( ax1, x, y, U, V, arrowhead=arrowheads )
I am using Observables because I have vector fields at multiple timepoints and I want to use a slider to scroll through the vector fields... which leads to creating custom BezierCurves for the arrowheads every time I move the slider...
You mentioned poly
doesn't run into this error. Maybe arrows
should use poly
instead of scatter
for 2D plots if the performance isn't compromised. Or maybe there is a much simpler way to individually scale arrowheads....
@Marc-3d, you should be able to pass arrowsize=max.(arrow_magnitudes, 0.1)
, if I'm not mistaken.
per the instructions in https://github.com/MakieOrg/Makie.jl/pull/1494 i'm filing an issue.
i tried following the suggestions there, but seemingly the API has changed:
i supplied two Int64's to
Makie.get_cache_path()
and found some old files in the directory returned, but deleting them manually didn't help:i found
Makie.get_texture_atlas()
butempty!
is not defined on it:what should i do?
for context, i'm using GeometryTypes.jl/Polygon to create custom marker shapes for scatter. 100s of them for each frame in a movie. it gets through the first few frames and then errors out. i'm hoping that if i can just clear the cache after each frame it will work.
thanks!