Skip to content
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

Omitting axis labels on portions of Facet charts #9477

Open
claysmyth opened this issue Nov 20, 2024 · 2 comments
Open

Omitting axis labels on portions of Facet charts #9477

claysmyth opened this issue Nov 20, 2024 · 2 comments
Labels

Comments

@claysmyth
Copy link

What is your suggestion?

It wold be amazing if the styling of Facets charts could be customized to only show axis labels on specified portions of the facet. This is a common technique in scientific manuscripts to clean up multi-panel figures and reduce clutter and redundancy.

To my understanding, it is quite difficult to have variable axis labeling (or remove axis entirely) from subcomponents of the Facet chart.

The screenshot below was developed using altair, but building each suplot individually and aggregating using a For loop. Note how the x-ticks are only on the bottom right plots, and the y-axis ticks are only on the top left plot, to minimize redundancy.

Image

Have you considered any alternative solutions?

Yes, you can build each subcomponent individually and create a faceted chart by combining the individual subcomponents with | or &. The suggestion is to simplify this approach.

@joelostblom joelostblom transferred this issue from vega/altair Nov 20, 2024
@joelostblom
Copy link
Contributor

Thanks for the suggestion! This type of change would need to happen in the underlying Vega-Lite library before it can be available in Altair so I have moved your issue over to that repo.

@domoritz
Copy link
Member

The workaround for now is to use concatenation rather than faceting. Vega-Lite would need some more optimizations to support these kinds of customizations conveniently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants