Open Kolaru opened 1 year ago
AFAIK, you can attach metadata to a plot even now.
I'm not sure if the element-wise abstraction would work generically across recipes and input types, though...you could provide an index and the primitive plot, and perhaps provide a macro to make sure that the accessed attributes are actually AbstractVectors with the same length as the input array.
Do you have any other examples of usecases which this might be used for?
I am thinking about a PR to give easier access to the internal structure of a figure through iteration over the scene tree and layout tree.
While thinking about it, I realized that if each element had metadata (added at creation, by user or automatically, by Makie or by other package like AlgebraOfGraphics) then the user could filter elements by the metadata without having to understand the internal structure.
The example I have in mind is something like "I want all markers that correspond to a penguin with long beak (query), make them purple with thick stroke (action)".
It could look like