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

KeyError: key :alpha not found #4759

Open
2 tasks
jeremiedb opened this issue Jan 28, 2025 · 0 comments
Open
2 tasks

KeyError: key :alpha not found #4759

jeremiedb opened this issue Jan 28, 2025 · 0 comments
Labels

Comments

@jeremiedb
Copy link

jeremiedb commented Jan 28, 2025

  • Issue concerns both the most recent CairoMakie release (v0.13.1) and master
  • Reproduced on both Windows and Ubuntu, and from fresh temp environment

The following MWE works fine with CairoMakie v0.13.0. It however errors on both v0.13.1 and master.
My initial guess is that it may be related to changes brought by: to #4721

MWE:

using CairoMakie
f = Figure()
ax = Axis(f[1, 1])
density!(randn(100); label="test")
Legend(f[1, 2], ax)

ERROR: KeyError: key :alpha not found
Stacktrace:
  [1] getindex
    @ .\dict.jl:498 [inlined]
  [2] getindex
    @ C:\Users\jerem\.julia\packages\MakieCore\sHgwT\src\attributes.jl:106 [inlined]
  [3] getindex(x::Plot{Makie.density, Tuple{Vector{Float64}}}, key::Symbol)
    @ MakieCore C:\Users\jerem\.julia\packages\MakieCore\sHgwT\src\attributes.jl:192
  [4] getproperty
    @ C:\Users\jerem\.julia\packages\MakieCore\sHgwT\src\attributes.jl:86 [inlined]
  [5] legendelements(plot::Plot{Makie.density, Tuple{Vector{Float64}}}, legend::Attributes)
    @ Makie C:\Users\jerem\.julia\packages\Makie\Q6F2P\src\makielayout\blocks\legend.jl:529
  [6] LegendEntry(label::String, content::Plot{Makie.density, Tuple{Vector{Float64}}}, legend::Attributes; kwargs::@Kwargs{})
    @ Makie C:\Users\jerem\.julia\packages\Makie\Q6F2P\src\makielayout\blocks\legend.jl:408
  [7] LegendEntry
    @ C:\Users\jerem\.julia\packages\Makie\Q6F2P\src\makielayout\blocks\legend.jl:393 [inlined]
  [8] #2206
    @ .\none:0 [inlined]
  [9] iterate
    @ .\generator.jl:47 [inlined]
 [10] collect(itr::Base.Generator{Base.Iterators.Zip{Tuple{Vector{Plot{Makie.density, Tuple{Vector{Float64}}}}, Vector{String}}}, Makie.var"#2206#2207"{Attributes}})
    @ Base .\array.jl:834
 [11] to_entry_group(legend_defaults::Attributes, contents::Vector{Plot{Makie.density, Tuple{Vector{Float64}}}}, labels::Vector{String}, title::Nothing)
    @ Makie C:\Users\jerem\.julia\packages\Makie\Q6F2P\src\makielayout\blocks\legend.jl:577
 [12] Legend(fig_or_scene::GridPosition, contents::Vector{Plot{Makie.density, Tuple{…}}}, labels::Vector{String}, title::Nothing; bbox::Nothing, kwargs::@Kwargs{})
    @ Makie C:\Users\jerem\.julia\packages\Makie\Q6F2P\src\makielayout\blocks\legend.jl:613
 [13] Legend(fig_or_scene::GridPosition, contents::Vector{Plot{Makie.density, Tuple{Vector{Float64}}}}, labels::Vector{String}, title::Nothing)
    @ Makie C:\Users\jerem\.julia\packages\Makie\Q6F2P\src\makielayout\blocks\legend.jl:605
 [14] Legend(fig_or_scene::GridPosition, axis::Axis, title::Nothing; merge::Bool, unique::Bool, kwargs::@Kwargs{})
    @ Makie C:\Users\jerem\.julia\packages\Makie\Q6F2P\src\makielayout\blocks\legend.jl:665
 [15] Legend
    @ C:\Users\jerem\.julia\packages\Makie\Q6F2P\src\makielayout\blocks\legend.jl:662 [inlined]
 [16] Legend(fig_or_scene::GridPosition, axis::Axis)
    @ Makie C:\Users\jerem\.julia\packages\Makie\Q6F2P\src\makielayout\blocks\legend.jl:662
 [17] top-level scope
    @ REPL[7]:1
Some type information was truncated. Use `show(err)` to see complete types.
@jeremiedb jeremiedb added the bug label Jan 28, 2025
penelopeysm added a commit to TuringLang/MCMCChains.jl that referenced this issue Feb 9, 2025
penelopeysm added a commit to TuringLang/MCMCChains.jl that referenced this issue Feb 9, 2025
* Update Docs.yml

* Update Docs.yml

* Update DocsNav.yml

* No need of deploydocs() after using new Docs & DocsNav workflows

* Remove GKSwstype envvar

* Upper bound CairoMakie to 0.13.0

MakieOrg/Makie.jl#4759

---------

Co-authored-by: Penelope Yong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant