Skip to content
New issue

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

Smoothing error in Julia 1.10 #483

Closed
gyansinha opened this issue Dec 28, 2023 · 1 comment
Closed

Smoothing error in Julia 1.10 #483

gyansinha opened this issue Dec 28, 2023 · 1 comment

Comments

@gyansinha
Copy link

Bug description

Smoothing example from documentation errors in Julia 1.10

Steps to reproduce

x = 1:0.05:10
a = rand(1:7, length(x))
y = sin.(x) .+ a .+ 0.1 .* randn.()
df = (; x, y, a)
specs = data(df) * mapping(:x, :y, color=:a => nonnumeric) * (smooth() + visual(Scatter))
draw(specs)

Error reporting

ERROR: Tuple field type cannot be Union{}
Stacktrace:
  [1] map(f::Function, d::Dictionaries.Indices{Union{}})
    @ Dictionaries ~/.julia/packages/Dictionaries/7aBxp/src/map.jl:91
  [2] unnest(vs::Vector{@NamedTuple{}}, indices::Dictionaries.Indices{Union{}})
    @ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/tbMEb/src/algebra/layer.jl:81
  [3] unnest_dictionaries(vs::Vector{@NamedTuple{}})
    @ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/tbMEb/src/algebra/layer.jl:84
  [4] map(f::AlgebraOfGraphics.var"#183#184"{AlgebraOfGraphics.SmoothAnalysis}, processedlayer::ProcessedLayer)
    @ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/tbMEb/src/algebra/layer.jl:101
  [5] (::AlgebraOfGraphics.SmoothAnalysis)(input::ProcessedLayer)
    @ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/tbMEb/src/transformations/smooth.jl:8
  [6] process(layer::Layer)
    @ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/tbMEb/src/algebra/processing.jl:102
  [7] iterate(g::Base.Generator, s::Vararg{Any})
    @ Base ./generator.jl:47 [inlined]
  [8] collect(itr::Base.Generator{Layers, typeof(AlgebraOfGraphics.process)})
    @ Base ./array.jl:834
  [9] map
    @ ./abstractarray.jl:3310 [inlined]
 [10] ProcessedLayers(a::Layers)
    @ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/tbMEb/src/algebra/layers.jl:41
 [11] compute_axes_grid(d::Layers; axis::@NamedTuple{}, palettes::@NamedTuple{})
    @ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/tbMEb/src/algebra/layers.jl:114
 [12] compute_axes_grid
    @ ~/.julia/packages/AlgebraOfGraphics/tbMEb/src/algebra/layers.jl:110 [inlined]
 [13] compute_axes_grid(fig::Figure, d::Layers; axis::@NamedTuple{}, palettes::@NamedTuple{})
    @ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/tbMEb/src/algebra/layers.jl:100
 [14] compute_axes_grid
    @ ~/.julia/packages/AlgebraOfGraphics/tbMEb/src/algebra/layers.jl:97 [inlined]
 [15] #241
    @ ~/.julia/packages/AlgebraOfGraphics/tbMEb/src/draw.jl:21 [inlined]
 [16] update
    @ ~/.julia/packages/AlgebraOfGraphics/tbMEb/src/draw.jl:10 [inlined]
 [17] plot!(fig::Figure, d::Layers; axis::@NamedTuple{}, palettes::@NamedTuple{})
    @ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/tbMEb/src/draw.jl:21
 [18] plot!
    @ ~/.julia/packages/AlgebraOfGraphics/tbMEb/src/draw.jl:16 [inlined]
 [19] (::AlgebraOfGraphics.var"#245#246"{…})(f::Figure)
    @ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/tbMEb/src/draw.jl:48
 [20] update
    @ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/tbMEb/src/draw.jl:10 [inlined]
 [21] #draw#244
    @ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/tbMEb/src/draw.jl:47 [inlined]
 [22] draw(d::Layers)
    @ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/tbMEb/src/draw.jl:44
 [23] top-level scope
    @ ~/admin/platforms/fanniemae/src/transitions.jl:275
Some type information was truncated. Use `show(err)` to see complete types.

julia> 

Images

If applicable, add images of the plots you obtained to help explain your problem.

Version info

julia> versioninfo()
Julia Version 1.10.0
Commit 3120989f39b (2023-12-25 18:01 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × Intel(R) Xeon(R) CPU E5-2690 v4 @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, broadwell)
  Threads: 5 on 8 virtual cores
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 4
  LD_LIBRARY_PATH = /home/gsinha/admin/lib

julia> Pkg.status()
Status `~/admin/platforms/fanniemae/Project.toml`
  [cbdf2221] AlgebraOfGraphics v0.6.17
  [69666777] Arrow v2.7.0
  [4f18b42c] BusinessDays v0.9.23
  [336ed68f] CSV v0.10.11
  [13f3f980] CairoMakie v0.11.4
  [324d7699] CategoricalArrays v0.10.8
  [8be319e6] Chain v0.5.0
  [8bbde0e6] Clover v1.0.0-DEV `~/.julia/dev/Clover`
  [a93c6f00] DataFrames v1.6.1
  [1313f7d8] DataFramesMeta v0.14.1
⌃ [d2f5444f] DuckDB v0.8.1
  [6e85b7ee] FredData v0.6.0
  [38e38edf] GLM v1.9.0
  [f7bf1975] Impute v0.6.11
  [bac558e1] OrderedCollections v1.6.3
  [91a5bcdd] Plots v1.39.0
  [6099a3de] PythonCall v0.9.15
  [6f49c342] RCall v0.13.18
  [1277b4bf] ShiftedArrays v2.0.0
  [2913bbd2] StatsBase v0.34.2
  [3eaba693] StatsModels v0.7.3
  [f3b207a7] StatsPlots v0.15.6
  [8a913413] Survival v0.3.0
  [fdbf4ff8] XLSX v0.10.0
  [ade2ca70] Dates
  [fa267f1f] TOML v1.0.3
Info Packages marked with ⌃ have new versions available and may be upgradable.

Before opening an issue

Make sure you are on the latest release of AlgebraOfGraphics and Makie.
Make sure no other issue exists describing the same problem you have encountered.

@SimonDanisch
Copy link
Member

Duplicate of #472

@SimonDanisch SimonDanisch marked this as a duplicate of #472 Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants