tidyverse / ggplot2

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

Binned guides discard out-of-bound breaks #5873

Closed teunbrand closed 1 month ago

teunbrand commented 2 months ago

This PR aims to fix #5870.

Briefly, it includes a step where out-of-bounds breaks are discarded during the parsing of binned breaks.

Reprex from issue:

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

ggplot(mpg, aes(displ, hwy, colour = hwy)) +
  geom_point() +
  guides(colour = guide_coloursteps(show.limits = T))

Created on 2024-05-01 with reprex v2.1.0