Closed teunbrand closed 10 months ago
Thank you! Looks good.
What is the best source to learn about the guide system? I had to fumble around the source code before and now that things are changing, I probably don't understand half of what's going on.
Yeah there still isn't good guide to guides. I suppose the Guides section of the ggproto documentation is the closest thing, which you can find here. There is also this WIP blog post that talks about it a little bit.
The currently tricky bit about the guides in metR is that they maintain compatibility with both old and new versions of ggplot2, so it is a bit of a Frankenstein's monster between the S3 and ggproto systems. If you at some point decide to bump the required version of ggplot2 to >= 3.5.0, you wouldn't have to deal with the S3 part anymore.
If you at some point decide to bump the required version of ggplot2 to >= 3.5.0, you wouldn't have to deal with the S3 part anymore.
Yes. What I actually need to do is to move all the ggplo2-extension stuff to another package and have that package follow ggplot2, while the other functionality can be agnostic to ggplot2 versions.
That makes sense to me. This is just friendly reminder that the release is due soon.
New version of metR is now on CRAN 🎉
Hi Elio,
We have been preparing a new release of ggplot2 and during a reverse dependency check, it became apparent that the prospective ggplot2 3.5.0 would break metR.
In a sense, this PR is a follow-up on #177 in that it aims to make metR compatible with both the old an new versions of ggplot2. A few things of note:
makeContent.labelgrob
was removed from ggplot2, so this PR provides a facsimile for rendering metR's labels.guide_colorstrip()
deal with.guide_vector()
are in lockstep with changes to guides in ggplot2 since #177.scale_name
field in scales is deprecated, sogeom_arrow()
now checks the transformation's name for detecting date scales.To test the code changes with the release candidate, you can install it with the code below:
The release of ggplot2 3.5.0 is scheduled for the 12th of February. The progress of the release can be tracked in https://github.com/tidyverse/ggplot2/issues/5588. We hope that this PR might help metR get out a fix if necessary.