You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're investigating transitioning some of our JuliaAstro plotting infra over to Makie.jl, but are currently hitting this issue when trying to work with units that are not Quantities, which comes up when dealing with magnitudes in UnitfulAstro or logarithmic units in base Unitful for example:
julia> using GLMakie, Unitful
julia> scatter((1:10)u"dB")
ERROR: ArgumentError: Conversion failed for Scatter (With conversion trait PointBased()) with args: Tuple{Vector{Gain{Unitful.LogInfo{:Decibel, 10, 10}, :?, 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}}}.`
Stacktrace:
[1] conversion_pipeline(P::Type{…}, used_attrs::Tuple{}, args::Tuple{…}, kw_obs::Observable{…}, args_obs::Tuple{…}, user_attributes::Dict{…}, deregister::Vector{…}, recursion::Int64)
@ Makie ~/projects/Makie.jl/src/interfaces.jl:241
[2] conversion_pipeline(P::Type{…}, used_attrs::Tuple{}, args::Tuple{…}, kw_obs::Observable{…}, args_obs::Tuple{…}, user_attributes::Dict{…}, deregister::Vector{…}, recursion::Int64)
@ Makie ~/projects/Makie.jl/src/interfaces.jl:233
[3] conversion_pipeline(P::Type{…}, used_attrs::Tuple{}, args::Tuple{…}, kw_obs::Observable{…}, args_obs::Tuple{…}, user_attributes::Dict{…}, deregister::Vector{…})
@ Makie ~/projects/Makie.jl/src/interfaces.jl:213
[4] (Scatter)(user_args::Tuple{Vector{Gain{Unitful.LogInfo{…}, :?, Int64}}}, user_attributes::Dict{Symbol, Any})
@ Makie ~/projects/Makie.jl/src/interfaces.jl:273
[5] _create_plot(F::Function, attributes::Dict{Symbol, Any}, args::Vector{Gain{Unitful.LogInfo{…}, :?, Int64}})
@ Makie ~/projects/Makie.jl/src/figureplotting.jl:316
[6] #scatter#54
@ ~/.julia/packages/MakieCore/sHgwT/src/recipes.jl:510 [inlined]
[7] scatter(args::Vector{Gain{Unitful.LogInfo{:Decibel, 10, 10}, :?, Int64}})
@ MakieCore ~/.julia/packages/MakieCore/sHgwT/src/recipes.jl:508
[8] top-level scope
@ REPL[6]:1
Some type information was truncated. Use `show(err)` to see complete types.
At any rate, #3226 has been a game changer for working with Unitful.jl, thank you for adding this support!
For plot types, please add an image of how it should look like
julia> using GLMakie, Unitful
julia> scatter((1:10)u"m")
# but replace "m" with "dB" or "mag"
The text was updated successfully, but these errors were encountered:
Feature description
Would it be possible to add
Unitful.Gain
to the list of supported units in unitful-integrations.jl?We're investigating transitioning some of our JuliaAstro plotting infra over to Makie.jl, but are currently hitting this issue when trying to work with units that are not
Quantities
, which comes up when dealing with magnitudes in UnitfulAstro or logarithmic units in base Unitful for example:At any rate, #3226 has been a game changer for working with Unitful.jl, thank you for adding this support!
For plot types, please add an image of how it should look like
The text was updated successfully, but these errors were encountered: