Skip to content

Sometimes units are not handled #3945

Open
@aplavin

Description

@aplavin

I encountered this strange inconsistency:

# works:
julia> scatter([1u"m"], [2])

# works:
julia> scatter([(1, 2)])

# doesn't work:
julia> scatter([(1u"m", 2)])
ERROR: ArgumentError:     Conversion failed for Scatter (With conversion trait PointBased()) with args: Tuple{Vector{Tuple{Quantity{Int64, 𝐋, Unitful.FreeUnits{(m,), 𝐋, nothing}}, Int64}}} .
    Scatter requires to convert to argument types Tuple{AbstractVector{<:Union{Point2, Point3}}}, which convert_arguments didn't succeed in.
    To fix this overload convert_arguments(P, args...) for Scatter or PointBased() and return an object of type Tuple{AbstractVector{<:Union{Point2, Point3}}}.`

I guess it's an omission somewhere in the pipeline? The pipeline is quite involved, so not sure where exactly.

  • are you running newest version (version from docs) ?
  • can you reproduce the bug with a fresh environment ? (]activate --temp; add Makie)
  • What platform + GPU are you on?

Metadata

Metadata

Assignees

No one assigned

    Labels

    MakieBackend independent issues (Makie core)enhancementFeature requests and enhancementsunitsaka dim converts

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions