We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I think units should add plot recipes for the types. However, it's quite hard because it's hard to get the dispatch right. Here's what I tried:
@recipe f{T<:SIUnits.SIQuantity}(::Type{T}, x::T) = x.val # Works #@recipe f{T<:SIUnits.SIQuantity{N,m,kg,s,A,K,mol,cd,rad,sr}}(::Type{SIUnits.SIQuantity{N,m,kg,s,A,K,mol,cd,rad,sr}},x::T) map((y)->y.val,x) #Cannot compile #@recipe f{T<:AbstractArray{SIUnits.SIQuantity}}(::Type{T}, unitArray::T) = map((x)->x.val,unitArray) # Doesn't dispatch onto this because parametric array problems @recipe f{T<:AbstractArray{SIUnits.SIQuantity{Float64,0,0,1,0,0,0,0,0,0}}}(::Type{T}, unitArray::T) = (map((x)->x.val,unitArray)) # Works for seconds
This is related to JuliaPlots/Plots.jl#427
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I think units should add plot recipes for the types. However, it's quite hard because it's hard to get the dispatch right. Here's what I tried:
This is related to JuliaPlots/Plots.jl#427
The text was updated successfully, but these errors were encountered: