You can plot multiple polys in one go, and then just update the whole poly array each frame, which should be fairly efficient:
p1 = decompose(Point2f0, Circle(Point2f0(0), 1f0))
p2 = Point2f0[(0, 0), (0, 1), (1, 1), (1, 0)]
polys = map(1:10) do i
p = (p1, p2)[rand(1:2)]
off = (rand(Point2f0) .* 5)
size = rand()
map(p) do point
off .+ (point .* size)
end
end
poly(polys, scale_plot = false, color = rand(RGBf0, 10))
You can also rotate/scale/translate any plot:
scene = Scene()
poly_plots = map(polys) do poly
poly!(poly, color = rand(RGBf0), scale_plot = false)[end]
end
display(scene)
rotate!(poly_plots[1], 0.5)
translate!(poly_plots[1], 0.0, 0.1, 0.0).
The above could be more efficient then updating the whole poly array - depends a bit on how many points you have per poly.
This would be the most efficient, but would require that each polygon you want has a unicode representation:
vals = rand(10)
positions = rand(Point2f0, 10)
markers = [('◀', '■', '⬣', '⬤')[rand(1:4)] for i in 1:10]
scatter(positions, color = vals, rotations = vals, marker = markers)
It’s also a bit unprecise, but I think if you supply markersizes, it should be scalable to the correct size