Implement correct display of vector-like structs #2936
Unanswered
haakon-e
asked this question in
Questions about using Pluto
Replies: 2 comments 1 reply
-
The example above doesn't make clear why better printing is useful. The package allows to construct arrays that with named dimensions. E.g. julia> temperature = DimArray(round.(rand(5) .* 30, digits=1), (city = ["Vienna", "Berlin", "Prague", "Bratislava", "Budapest"],))
╭───────────────────────────────╮
│ 5-element DimArray{Float64,1} │
├───────────────────────────────┴──────────────────────────────────────── dims ┐
↓ city Categorical{String} ["Vienna", "Berlin", "Prague", "Bratislava", "Budapest"] Unordered
└──────────────────────────────────────────────────────────────────────────────┘
"Vienna" 24.4
"Berlin" 1.5
"Prague" 3.0
"Bratislava" 18.1
"Budapest" 28.9
julia> temperature[city=At("Vienna")]
24.4 Would be nice if Pluto could display the correct labels, at least when the vector is unfolded |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for the feedback! Perhaps the Pluto tree viewer should be disabled for all If so, we can add an exception similar to Symbolics.jl here Pluto.jl/src/runner/PlutoRunner/src/integrations.jl Lines 43 to 48 in aaa835b |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I'm wondering if there's a "template" or suggested approach for how to make vector-like (or row-like) structs display "nicely" in Pluto.
This question was originally asked in rafaqz/DimensionalData.jl#725
Some key information from that post:
Printing
DimArray
s works nicely in (VSCode) terminal window:but in Pluto, it only works for
DimArray
s with multiple dimensions:Beta Was this translation helpful? Give feedback.
All reactions