Giter VIP home page Giter VIP logo

Comments (4)

felixcremer avatar felixcremer commented on August 27, 2024

Thanks for the issue.
I can reproduce this.
With one dimensional DimArrays it is not running into a stack overflow error, but it ignores the units and the values of the Dimension but it correctly uses the Dimension label for the axis label.

julia> ddu = DimArray(rand(3), (Dim{:freq}((1.0:0.5:2.0)u"Hz")))
╭───────────────────────────────╮
│ 3-element DimArray{Float64,1} │
├───────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────── dims ┐
   freq Sampled{Quantity{Float64, 𝐓^-1, Unitful.FreeUnits{(Hz,), 𝐓^-1, nothing}}} (1.0:0.5:2.0) Hz ForwardOrdered Regular Points
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
 1.0 Hz  0.406088
 1.5 Hz  0.834368
 2.0 Hz  0.0332971

julia> plot(ddu)

I expect that this related to by #720.

from dimensionaldata.jl.

asinghvi17 avatar asinghvi17 commented on August 27, 2024

[14] convert_arguments(::Type{Heatmap}, ::IntervalSets.ClosedInterval{Quantity{…}}, ::Vararg{Any}; kw::@Kwargs{})

This stuff is meant to be handled by expand_dimensions, so implementing #720 may help here.

from dimensionaldata.jl.

rafaqz avatar rafaqz commented on August 27, 2024

Ah right, really need #720!

I am super busy currently I'm unlikely to have time for it soon. So if anyone wants to try to for it

from dimensionaldata.jl.

felixcremer avatar felixcremer commented on August 27, 2024

It only worked on 1-dim arrays because it ignored the lookup values of the axis with #714 I get the following error.

julia> plot(ddu)
ERROR: MethodError: no method matching convert_arguments(::PointBased, ::StepRange{Quantity{…}, Quantity{…}}, ::Vector{Float64})

Closest candidates are:
  convert_arguments(::PointBased, ::AbstractVector{T} where T<:Number, ::AbstractVector{T} where T<:Number, ::AbstractVector{T} where T<:Number)
   @ Makie ~/.julia/packages/Makie/iRM0c/src/conversions.jl:131
  convert_arguments(::PointBased, ::AbstractArray, ::AbstractVector, ::AbstractArray)
   @ Makie ~/.julia/packages/Makie/iRM0c/src/conversions.jl:112
  convert_arguments(::PointBased, ::IntervalSets.ClosedInterval, ::AbstractVector{T} where T<:Number)
   @ Makie ~/.julia/packages/Makie/iRM0c/src/conversions.jl:166
  ...

Stacktrace:
 [1] convert_arguments(t::PointBased, A::DimVector{…})
   @ DimensionalDataMakie ~/.julia/dev/DimensionalData/ext/DimensionalDataMakie.jl:353
 [2] _pointbased1(A::DimVector{…}, attributes::@Kwargs{}; set_axis_attributes::Bool)
   @ DimensionalDataMakie ~/.julia/dev/DimensionalData/ext/DimensionalDataMakie.jl:94
 [3] _pointbased1
   @ ~/.julia/dev/DimensionalData/ext/DimensionalDataMakie.jl:89 [inlined]
 [4] plot(A::DimVector{…}; axislegendkw::@NamedTuple{}, attributes::@Kwargs{})
   @ DimensionalDataMakie ~/.julia/dev/DimensionalData/ext/DimensionalDataMakie.jl:77
 [5] plot(A::DimVector{…})
   @ DimensionalDataMakie ~/.julia/dev/DimensionalData/ext/DimensionalDataMakie.jl:76
 [6] top-level scope
   @ REPL[43]:1
Some type information was truncated. Use `show(err)` to see complete types.

from dimensionaldata.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.