Skip to content

Makie Conversion failed #1146

@Beforerr

Description

@Beforerr

The following codes failed when tried to plot! an existing axis

t = DateTime(2010):Day(1):DateTime(2011)
x = rand(length(t))
da = DimArray(x,Ti(t))
plot(da)
plot!(da)
ERROR: ArgumentError: 
    Conversion failed for Scatter (With conversion trait PointBased()) with args:
        Tuple{DimVector{Float64, Tuple{Ti{DimensionalData.Dimensions.Lookups.Sampled{DateTime, StepRange{DateTime, Day}, DimensionalData.Dimensions.Lookups.ForwardOrdered, DimensionalData.Dimensions.Lookups.Regular{Day}, DimensionalData.Dimensions.Lookups.Points, NoMetadata}}}, Tuple{}, Vector{Float64}, DimensionalData.NoName, NoMetadata}} 
    Got converted to: Tuple{StepRange{DateTime, Day}, Vector{Float64}}
    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}}}.`

While the simple codes below work, so I think this may be a bug in DimensionalData

plot(t, x)
plot!(t, x)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions