Skip to content

Propogate guide_axis_stack(spacing) argument. - #5615

Merged
teunbrand merged 1 commit into
tidyverse:rc/3.5.0from
teunbrand:stacked_axis_spacing
Jan 4, 2024
Merged

teunbrand merged 1 commit into
tidyverse:rc/3.5.0from
teunbrand:stacked_axis_spacing

Conversation

@teunbrand

Copy link
Copy Markdown
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

@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 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