MakieOrg / AlgebraOfGraphics.jl

An algebraic spin on grammar-of-graphics data visualization in Julia. Powered by the Makie.jl plotting ecosystem.
https://aog.makie.org
MIT License
443 stars 45 forks source link

`axis = (; xlabelvisible = false)` doesn't work if mapping.col is used #557

Open vladdez opened 1 month ago

vladdez commented 1 month ago

Bug description

axis = (; xlabelvisible = false) doesn't work if mapping.col is used

Steps to reproduce

using Unfold, UnfoldMakie, AlgebraOfGraphics
m = example_data("UnfoldLinearModel")
results = coeftable(m)

plot_erp(results; axis = (; xlabelvisible = false, xticklabelsvisible = false)) #works
plot_erp(
        results;
        mapping = (; col = :coefname),
        axis = (;
            xlabel = "test",
            titlevisible = false,
            xlabelvisible = false,
            ylabelvisible = false,
            yticklabelsvisible = false,
            xticklabelsvisible = false,
        ),
) #not working

Images

image

Version info

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: 128 × AMD EPYC 7452 32-Core Processor WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-15.0.7 (ORCJIT, znver2) Threads: 1 on 128 virtual cores Environment: JULIA_EDITOR = code JULIA_NUM_THREADS = JULIA_DEBUG = UnfoldMakie

AlgebraOfGraphics v0.8.7 CairoMakie v0.12.9

jkrumbiegel commented 1 month ago

Hm that doesn't work because the label is not an axis xlabel but a separate Label that's drawn in a similar position (but can also sit between axes). I'm not sure it makes sense to pretend like xlabelvisible should affect that.

behinger commented 1 month ago

So in AoG, if you have faceting, how would you change the label of individual axes? Aka, how to access that label/property?

jkrumbiegel commented 1 month ago

What do you mean by "individual axes"? Usually in facetting, if the same label appears under every axis, they're merged. The label is the one passed in the mapping usually, like mapping(:x => "x label")