tidyverse / ggplot2

An implementation of the Grammar of Graphics in R
https://ggplot2.tidyverse.org
Other
6.45k stars 2.02k forks source link

MIssing axis when breaks = NULL #5816

Closed venpopov closed 4 months ago

venpopov commented 5 months ago

This is a repeat of #2983. When breaks = NULL in scale_*, the axis disappears altogether, although I expect the line to remain. #2983 was solved back then by #3257, but now the same incorrect behavior happens.

library(dplyr)
library(ggplot2)
data.frame(x = rnorm(100), y = rnorm(100)) %>% 
  ggplot(aes(x,y)) +
  geom_point() +
  scale_x_continuous(breaks = NULL) +
  theme_classic()

Created on 2024-03-29 with reprex v2.1.0