mitchelloharawild / distributional

Vectorised distributions for R
https://pkg.mitchelloharawild.com/distributional
GNU General Public License v3.0
94 stars 15 forks source link

`guide_level()` compatibility with ggplot2 >3.4.2 #92

Closed teunbrand closed 10 months ago

teunbrand commented 1 year ago

Hello Mitchell,

Apologies for the cold PR without posting an issue first. The ggplot2 package has changed the implementation of the guide system, which means that the old S3 system will no longer work, see ggplot2's news file. I'm aware that graphics functionality in distributional is scheduled to be deprecated, per here, but there are packages that reexport the guide functionality.

In any case, what this PR does is to create a hybrid of guide_level() that should be compatible with the old system and the new system to ease transition. It is work in progress (WIP) for now, as I'm doing an inventory of how to preserve as many S3 guide extensions as is reasonable.

Best, Teun

teunbrand commented 10 months ago

This should now be compatible with CRAN and development version of ggplot2