-
-
Notifications
You must be signed in to change notification settings - Fork 364
Open
Labels
bugconversionsMainly `convert_arguments`Mainly `convert_arguments`planningFor discussion and planning developmentFor discussion and planning developmentrecipes
Description
Trying to make a proper recipe for stuff like lines(function) that plot the function over the whole axis x-range. Current hacky implementation at https://github.com/JuliaAPlavin/MakieExtra.jl/blob/master/src/axisfunction.jl.
However, following the docs and defining required functions I still get a conversion error:
function Makie.plot!(p::Lines{<:Tuple{Function}})
# TODO
end
Makie.convert_arguments(::Type{<:Lines}, f::Function) = (f,)
lines(sin)
# ArgumentError: Conversion failed for MakieCore.Lines (With conversion trait MakieCore.PointBased()) with args: Tuple{typeof(sin)} .
# MakieCore.Lines requires to convert to argument types Tuple{AbstractVector{<:Union{GeometryBasics.Point2, GeometryBasics.Point3}}}, which convert_arguments didn't succeed in.
# To fix this overload convert_arguments(P, args...) for MakieCore.Lines or MakieCore.PointBased() and return an object of type Tuple{AbstractVector{<:Union{GeometryBasics.Point2, GeometryBasics.Point3}}}.`How to define it properly?
Metadata
Metadata
Assignees
Labels
bugconversionsMainly `convert_arguments`Mainly `convert_arguments`planningFor discussion and planning developmentFor discussion and planning developmentrecipes