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

position_stack() does not remove missing data #5519

Merged
merged 6 commits into from
Dec 14, 2023

Conversation

teunbrand
Copy link
Collaborator

This PR aims to fix #3532.

Instead of removing missing data, position_stack() sets all the positions of the missing data as missing. As missing data gets treated as having a height of 0, this shouldn't affect the stack calculations. However, the missing data now gets handled by the geom instead of the position, so the layer's na.rm setting kicks in.

Copy link
Member

@thomasp85 thomasp85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add NEWS bullet

@thomasp85 thomasp85 added this to the ggplot2 3.5.0 milestone Dec 14, 2023
@teunbrand teunbrand merged commit aa41dcb into tidyverse:main Dec 14, 2023
12 checks passed
@teunbrand teunbrand deleted the stack_narm branch December 14, 2023 11:59
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.

na.rm have no effect in geom_col with position_stack
2 participants