wilkelab / cowplot

cowplot: Streamlined Plot Theme and Plot Annotations for ggplot2
https://wilkelab.org/cowplot/
701 stars 84 forks source link

Update for ggplot2 3.5.0 #200

Closed teunbrand closed 7 months ago

teunbrand commented 7 months ago

Hi Claus,

As you might have noticed, we have been preparing a new release of ggplot2. During a reverse dependency check, it became apparent that the prospective ggplot2 3.5.0 would break cowplot.

This PR updates cowplot to work with the new ggplot2 version. It does the following things:

What you still might consider but isn't currently breaking, is how get_legend() should handle multiple guide positions introduced by https://github.com/tidyverse/ggplot2/pull/5488.

To test the code changes with the release candidate, you can install it with the code below:

remotes::install_github("tidyverse/ggplot2", ref = remotes::github_pull("5592"))

The release of ggplot2 3.5.0 is scheduled for the 12th of Februari. The progress of the release can be tracked in https://github.com/tidyverse/ggplot2/issues/5588. I hope that this PR might help cowplot get out a fix if necessary.

clauswilke commented 7 months ago

Thanks! I'm impressed you went through all of this and fixed it. I was always worried this would break after your legend rewrite. I should have time next week to go over things in detail and prepare a release ahead of the ggplot2 release.

teunbrand commented 7 months ago

Ah a few cracks but it's not fundamentally broken I'd say. Nothing that can't be glued back together :)

clauswilke commented 7 months ago

Thanks! I understand the issue with get_legend() but I don't really have the bandwidth to think about it right now so I'll leave it at the duct-taped solution. If it's a real issue people will start complaining.

clauswilke commented 7 months ago

Just to confirm: This is on CRAN now. Will do ggridges next.

teunbrand commented 7 months ago

Thank you Claus!