Skip to content

Restore axis line when breaks = NULL. #5838

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 8 commits into from
Apr 29, 2024

Conversation

teunbrand
Copy link
Collaborator

This PR aims to fix #5816.

Briefly, it restores the behaviour pre-3.5.0 that breaks = NULL would omit ticks and labels but include the axis line.
In addition, that behaviour is now passed on to guide_axis_theta() and should be dealt with correctly when using guide_axis_stack().

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

ggplot(mpg, aes(displ, hwy)) +
  geom_point() +
  coord_radial() +
  scale_x_continuous(breaks = NULL) +
  guides(
    theta = guide_axis_stack("axis_theta", "axis_theta", spacing = unit(5, "mm"))
  ) +
  theme(axis.line = element_line())

Created on 2024-04-12 with reprex v2.1.0

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 073958d into tidyverse:main Apr 29, 2024
7 of 12 checks passed
@teunbrand teunbrand deleted the axis_null_breaks branch April 29, 2024 08:39
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.

MIssing axis when breaks = NULL
2 participants