ggplot2
ggplot2 copied to clipboard
Restore axis line when `breaks = NULL`.
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