Closed
Description
This is what it should look like if you add a modern guide to guides()
:
devtools::load_all("~/packages/ggplot2")
#> ℹ Loading ggplot2
guides(x = guide_axis())
#> <Guides[1] ggproto object>
#>
#> x : <GuideAxis>
However, an old S3 guide is stored incorrectly. You can see that by the guides printing as if fields of the S3 guide are separate guides:
guides(x = ggprism::guide_prism_minor())
#> Warning: The `<scale>` argument of `guides()` cannot be `FALSE`. Use "none" instead as
#> of ggplot2 3.3.4.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.
#> <Guides[8] ggproto object>
#>
#> title : <waiver>
#> check.overlap : "none"
#> angle : <NULL>
#> n.dodge : <numeric>
#> order : <numeric>
#> position : <waiver>
#> available_aes : "x"
#> name : "y"
#> title : "axis"
Created on 2024-10-28 with reprex v2.1.1
The issue stems from #6022 in that we now use is.guide()
here, which tests for the modern ggproto guide, while this clause was specifically designed for old S3 guides:
Line 72 in b174986