Hi All,
I’m looking for ways to generalize using IndexedTables
to graph N-Dimensional data,
but I’m stuck on how to collect the “for iter in eachindex(keys(tab_t1.index.columns))
”.
In that regard, would you please see MWE pseudocode snippet below and
let me know any suggestions you might have ?
using IndexedTables
using Plots
# 2D = 1Dy Dependent var equation of 1Dx INDependent var
tab_t1 = table( (x=1:5, y=randn(5)); pkey = [:x] )
str_current_equation_approximated = "(x=1:5, y=randn(5))"
println("##500-1 tab_t1.pkey():=",tab_t1.pkey[1])
###500 tab_t1.pkey():=1
# for (k,v) in zip(keys(t.index.columns), t.index.columns)
# push!(colNames, k)
# end
println("##500-1 tab_t1.index.columns:=",tab_t1.index.columns)
for iter in eachindex(keys(tab_t1.index.columns)) # COD eachindex(tab_t1.pkey())
# println(tab_t1[iter])
global plot1 = Plots.plot(iter, select(tab_t1.y,iter), title = str_current_equation_approximated) # Mod Template
global plot2 = Plots.plot(iter, select(tab_t1.y,iter), title = str_current_equation_approximated) # Mod Template
end
println("##500-1 !! END WORKS !! using IndexedTables - for iter in eachindex(keys(t1.columns)) - println(t1[iter]) !!")
##
##
# 3D = 1Dy Dependent var equation of 2Dxz INDependent vars
tab_t1 = table( (x=1:5, y=randn(5), z=randn(5)); pkey = [:x,:z] )
str_current_equation_approximated = "(x=1:5, y=randn(5), z=randn(5)"
println("##600-1 tab_t1.pkey():=",tab_t1.pkey[1])
###500 tab_t1.pkey():=1
# for (k,v) in zip(keys(t.index.columns), t.index.columns)
# push!(colNames, k)
# end
println("##600-1 tab_t1.index.columns:=",tab_t1.index.columns)
for iter in eachindex(keys(tab_t1.index.columns)) # COD eachindex(tab_t1.pkey())
# println(tab_t1[iter])
global plot1 = Plots.plot(iter, select(tab_t1.y,iter), title = str_current_equation_approximated) # Mod Template
global plot2 = Plots.plot(iter, select(tab_t1.y,iter), title = str_current_equation_approximated) # Mod Template
end
println("##600-1 !! END WORKS !! using IndexedTables - for iter in eachindex(keys(t1.columns)) - println(t1[iter]) !!")
##
##
Thank You,
Marc Cox
Ps> If you’re interested I’m also happy to share my complete Plotting template
when I’ve completed it - just didn’t want to muddy up the MWE issue right now.