-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Milestone
Description
Given the below recipe Makie will dispatch to the right method when given input x of type CategoricalVector to myrecipe(x, y).
using CairoMakie, AlgebraOfGraphics, CategoricalArrays
@recipe(MyRecipe, x, y) do _
Attributes()
end
function Makie.plot!(p::MyRecipe)
Makie.@extract p (x, y)
scatter!(p, x, y)
return p
end
function Makie.plot!(p::MyRecipe{<:Tuple{<:CategoricalVector,Any}})
Makie.@extract p (x, y)
map(x, y) do x, y
violin!(p, levelcode.(x), y)
end
return p
endBut when used as visual(MyRecipe) the x is of type Vector{Int} regardless of the input types. The inputs seem to always be reduced to barest possible representation.
Is this considered expected behaviour, or a fixable issue?
AoG version v0.5.4 and CairoMakie version v0.6.6.
Metadata
Metadata
Assignees
Labels
No labels