Skip to content

Conversation

@jkrumbiegel
Copy link
Member

@jkrumbiegel jkrumbiegel commented Aug 1, 2025

This PR introduces the subvisual function that can be used to style layers only when they match a target argument. For example, linear now uses a line and a band layer which can be identified via new :prediction and :ci labels. This allows to decouple line and band color, for example, or to create separate legends for both components:

mapping(1:20, 2 .* randn(20) .+ (1:20)) * (
    visual(Scatter) +
    linear() *
        subvisual(:prediction, color = :tomato, label = "Prediction") *
        subvisual(:ci, color = :teal, label = "CI")
) |> draw
image

@jkrumbiegel jkrumbiegel changed the title target for visual subvisual Sep 1, 2025
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.

2 participants