The plots you cite are outdated w.r.t. current Makie so I’m not sure how trustworthy they are. They are also not what I am expecting. I am expecting something like this: matplotlib.markers — Matplotlib 3.3.3 documentation , which is the first hit I get after googling “matplotlib available marker types”
I’m making a plotting framework for Agents.jl where users can plot their agents as scatter markers. It is convenient for us to do everything with scatter and forward splatted keywords to scatter.
Doesn’t it make more sense if scatter could accept a Polygon directly as a marker, instead of me writing an if clause? It might be that more people in the future will want to scatter plot something with arbitrary polygons.
I think we settled on doing poly(vector_of_polygons). The only thing is that it’s currently buggy to add vertices to these polygons interactively. But in the use case that we talked about, only the rotation and size was changed.
This solution works nicely, but as with the poly solution, I’m wondering if there’s a way to change the space-units from data to pixel. When you zoom in on a regular scatter-marker the size of the marker doesn’t change, which is great. I would have liked to be able to create a custom marker (from a polygon) that behaves similarly.
using CoordinateTransformations, Rotations
function Makie.convert_arguments(::PointBased, x::DirectedDrop)
f = Translation(x.c) ∘ LinearMap(Angle2d(x.θ))
n = 64
([f(Point2f(cos(t), sin(t)*sin(t/2)^2)) for t in range(0, 2π, n + 1)[1:end-1]], )
c = Point2f(2,3)
dd = Node(DirectedDrop(c, 0.0))
poly(dd, axis = (aspect = DataAspect(), ))
My question is, what is the best way to plug in the whole interplay between MarkerSpace versus DataSpace? And as a side-question, in the decomposition of my DirectedDrop, what is the correct way to specify the number of vertices I use to create the drop (right now, I just have it hard-coded to 64)?