Skip to content

Default bar width calculated panel-wise - #5125

Merged
teunbrand merged 4 commits into
tidyverse:mainfrom
teunbrand:default_bar_width
Mar 23, 2023
Merged

teunbrand merged 4 commits into
tidyverse:mainfrom
teunbrand:default_bar_width

Conversation

@teunbrand

Copy link
Copy Markdown
Collaborator

This PR aims to fix #4336.

Briefly, instead of determining the global resolution for calculating the default width, it now considers panel-wise resolution.

@thomasp85

Copy link
Copy Markdown
Member

Should this somehow be optional? Couldn't you imagine you'd want the same width on all panels despite varying data resolution?

@teunbrand

Copy link
Copy Markdown
Collaborator Author

I don't think it would make a lot of sense to make this optional, but I'm willing to entertain other ideas. To be clear: this PR will not introduce variable widths per panel, the bars in all panels will still have the same width. It is just that the resolution to determine the global width is calculated per panel, so that cross-panel resolution will become irrelevant (as I think it should be).

@thomasp85 thomasp85 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@teunbrand
teunbrand merged commit b1874b2 into tidyverse:main Mar 23, 2023
@teunbrand
teunbrand deleted the default_bar_width branch March 23, 2023 20:50
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.

Default width of geom_bar/geom_col under facetting

2 participants