Skip to content

Propogate guide_axis_stack(spacing) argument. #5615

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 1 commit into from
Jan 4, 2024

Conversation

teunbrand
Copy link
Collaborator

The aims of this PR to the RC is to fix a bug found with the spacing argument in guide_axis_stack().

Briefly, it is currently ignored because it isn't passed to new_guide().

library(ggplot2)

ggplot(mpg, aes(displ, hwy)) +
  geom_point() +
  guides(x = guide_axis_stack("axis", "axis", spacing = unit(1, "cm")))

With this PR, spacing is applied properly:

devtools::load_all("~/packages/ggplot2")
#> ℹ Loading ggplot2

ggplot(mpg, aes(displ, hwy)) +
  geom_point() +
  guides(x = guide_axis_stack("axis", "axis", spacing = unit(1, "cm")))

Created on 2023-12-27 with reprex v2.0.2

@teunbrand teunbrand added this to the ggplot2 3.5.0 milestone Jan 2, 2024
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.

LGTM

@teunbrand teunbrand merged commit 47b4bd0 into tidyverse:rc/3.5.0 Jan 4, 2024
@teunbrand teunbrand deleted the stacked_axis_spacing branch January 4, 2024 08:00
thomasp85 pushed a commit that referenced this pull request Feb 23, 2024
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