You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since #505, using visual(Density) or visual(ECDFPlot) no longer works, but it used to work using AoG v0.6.20:
julia> using AlgebraOfGraphics, CairoMakie
julia> layers =data((; x=randn(10))) *mapping(:x);
julia> draw(layers *visual(Lines)); # fine
julia> draw(layers *visual(ECDFPlot)) # errors
ERROR: No aesthetic mapping defined yet for plot type Plot{Makie.ecdfplot} with scientific eltypes (AlgebraOfGraphics.Continuous(),). AlgebraOfGraphics can only use plot types if it is told which attributes and input arguments map to which aesthetics like color, markersize or linewidth for example.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] aesthetic_mapping(T::Type{Plot{Makie.ecdfplot}}, scitypes::AlgebraOfGraphics.Continuous)
@ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/5jZeR/src/aesthetics.jl:50
[3] aesthetic_mapping(plottype::Type, attributes::Dictionaries.Dictionary{…}, scitypes::Vector{…})
@ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/5jZeR/src/aesthetics.jl:31
[4] aesthetic_mapping
@ ~/.julia/packages/AlgebraOfGraphics/5jZeR/src/aesthetics.jl:28 [inlined]
[5] compute_scale_properties(processedlayers::Vector{ProcessedLayer}, scales::AlgebraOfGraphics.Scales)
@ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/5jZeR/src/algebra/layers.jl:140
[6] compute_axes_grid(d::Layer, scales::AlgebraOfGraphics.Scales; axis::Dictionaries.Dictionary{Symbol, Any})
@ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/5jZeR/src/algebra/layers.jl:237
[7] compute_axes_grid
@ ~/.julia/packages/AlgebraOfGraphics/5jZeR/src/algebra/layers.jl:233 [inlined]
[8] compute_axes_grid(fig::Figure, d::Layer, scales::AlgebraOfGraphics.Scales; axis::Dictionaries.Dictionary{Symbol, Any})
@ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/5jZeR/src/algebra/layers.jl:205
[9] compute_axes_grid
@ ~/.julia/packages/AlgebraOfGraphics/5jZeR/src/algebra/layers.jl:202 [inlined]
[10] #338
@ ~/.julia/packages/AlgebraOfGraphics/5jZeR/src/draw.jl:20 [inlined]
[11] update
@ ~/.julia/packages/AlgebraOfGraphics/5jZeR/src/draw.jl:10 [inlined]
[12] plot!(fig::Figure, d::Layer, scales::AlgebraOfGraphics.Scales; axis::Dictionaries.Dictionary{Symbol, Any})
@ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/5jZeR/src/draw.jl:20
[13] plot!
@ ~/.julia/packages/AlgebraOfGraphics/5jZeR/src/draw.jl:16 [inlined]
[14] (::AlgebraOfGraphics.var"#343#344"{…})(f::Figure)
@ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/5jZeR/src/draw.jl:64
[15] update
@ ~/.julia/packages/AlgebraOfGraphics/5jZeR/src/draw.jl:10 [inlined]
[16] _draw(d::Layer, scales::AlgebraOfGraphics.Scales; axis::Dictionaries.Dictionary{…}, figure::Dictionaries.Dictionary{…}, facet::Dictionaries.Dictionary{…}, legend::Dictionaries.Dictionary{…}, colorbar::Dictionaries.Dictionary{…})
@ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/5jZeR/src/draw.jl:63
[17] _draw
@ ~/.julia/packages/AlgebraOfGraphics/5jZeR/src/draw.jl:60 [inlined]
[18] draw(d::Layer, scales::AlgebraOfGraphics.Scales; axis::@NamedTuple{}, figure::@NamedTuple{}, facet::@NamedTuple{}, legend::@NamedTuple{}, colorbar::@NamedTuple{}, palette::Nothing)
@ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/5jZeR/src/draw.jl:57
[19] draw
@ ~/.julia/packages/AlgebraOfGraphics/5jZeR/src/draw.jl:47 [inlined]
[20] draw(d::Layer)
@ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/5jZeR/src/draw.jl:47
[21] top-level scope
@ REPL[12]:1
Some type information was truncated. Use `show(err)` to see complete types.
julia> draw(layers *visual(Density)); # errors, same as above
...
Proposed solution
I thought just adding the following aesthetic_mapping overloads would work. This worked for Density but not for ECDFPlot. If we roll back CairoMakie to v0.11 it also works for ECDFPlot:
Problem description
Since #505, using
visual(Density)
orvisual(ECDFPlot)
no longer works, but it used to work using AoG v0.6.20:Proposed solution
I thought just adding the following
aesthetic_mapping
overloads would work. This worked forDensity
but not forECDFPlot
. If we roll back CairoMakie to v0.11 it also works forECDFPlot
:Environment
The text was updated successfully, but these errors were encountered: