Skip to content

RainClouds do not support dodge in AoG #584

Description

@haberdashPI

Bug description

This error shows up when using dodge in mapping for a visual(RainCloud):

julia> let fig
           fig = Figure()
           plt = data(plot_df) *
                 mapping(:band_name, :value; dodge=:site_name, color=:site_name, layout=:stage) *
                 visual(RainClouds)
           draw!(fig, plt)
           fig
       end
ERROR: ArgumentError: ProcessedLayer with plot type Plot{Makie.rainclouds} did not have :dodge in its AestheticMapping. The mapping was {1 = AlgebraOfGraphics.AesX, 2 = AlgebraOfGraphics.AesY, :color = AlgebraOfGraphics.AesColor}
Stacktrace:
  [1] hardcoded_or_mapped_aes(processedlayer::ProcessedLayer, key::Symbol, aes_mapping::Dictionaries.Dictionary{…})
    @ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/BPWA1/src/algebra/layers.jl:243
  [2] (::AlgebraOfGraphics.var"#p!#134"{})(key::Symbol)
    @ AlgebraOfGraphics ~/.julia/packages/AlgebraOfGraphics/BPWA1/src/algebra/layers.jl:167
  [3] foreach(f::AlgebraOfGraphics.var"#p!#134"{}, d::Dictionaries.Indices{…})
    @ Dictionaries ~/.julia/packages/Dictionaries/Cl0jU/src/foreach.jl:36
  [4] compute_scale_properties(processedlayers::Vector{ProcessedLayer}, scales::AlgebraOfGraphics.Scales)

Note that dodge is a documented keyword of raindlcouds.

Steps to reproduce

I can take to the time to generate MWE in a day or two when I have more bandwidth, but I think this should be easy to reproduce and wanted to post this sooner to keep it in my inbox.

Images

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

Version info

(dqc_spectral-summary-full-n...) pkg> st
Status `~/projects/jazz-001/projects/001/documents/dqc_spectral-summary-full-night-sxb20_2025-01-08/Project.toml`
  [fbe9abb3] AWS v1.92.0
  [1c724243] AWSS3 v0.11.2
  [cbdf2221] AlgebraOfGraphics v0.8.13
  [d44faf7a] BeaconThemes v1.2.0
  [13f3f980] CairoMakie v0.12.18
  [a93c6f00] DataFrames v1.7.0
  [25836db2] DatastoreSchemas v1.30.0
  [48062228] FilePathsBase v0.9.22
  [fe2206b3] TidierData v0.16.3

NOTE: this excludes some proprietary package names that would leak sensitive information. When I have bandwidth to provide a MWE without sensitive packages I will update the info here.

julia> versioninfo()
Julia Version 1.11.2
Commit 5e9a32e7af2 (2024-12-01 20:02 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 4 × Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, skylake-avx512)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)
Environment:
  JULIA_PKG_DEVDIR = {/home/ubuntu}/Documents/tools
  JULIA_PKG_USE_CLI_GIT = true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions