Skip to content

Fix labels in paginated plots with renamed layout scale #661

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

Merged
merged 2 commits into from
May 27, 2025

Conversation

jkrumbiegel
Copy link
Member

The previous reftest didn't catch this because it accidentally did a meaningless conversion (uppercasing letters that were already uppercase)

df = (;
    subject = [1, 1, 2, 2],
    group = ["A", "B", "A", "B"],
    x = 1:4,
    y = 5:8,
)

spec = data(df) * mapping(:x, :y, layout = (:subject, :group) => tuple) * visual(Scatter)
scls = scales(
    Layout = (;
        categories = [(1, "A") => "One A", (2, "A") => "Two A", (1, "B") => "One B", (2, "B") => "Two B"]
    )
)
draw(spec, scls)
draw(paginate(spec, scls, layout = 3), 1)

Before

image

After

image

@jkrumbiegel jkrumbiegel merged commit db8b30a into master May 27, 2025
5 checks passed
@jkrumbiegel jkrumbiegel deleted the jk/fix-layout-paginated-labels branch May 27, 2025 12:35
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

Successfully merging this pull request may close these issues.

1 participant