-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The future of update_geom_defaults()
#6085
Comments
Sorry, it might be a bit confusing that I use the term "soft-deprecated" in #6084. I didn't mean to formally deprecate it. Let me clarify a bit. In my understanding, now the recommendation is
and there's still no alternative for case 3. So, |
Thanks for the clarification, I had thought you meant |
In my understanding, "superseded" is the status that all usages are superseded by other functions. So, as long as it still has its unique use, probably it's not superseded yet. But, it's true that some of the usages are superseded. It's difficult to describe the nuance precisely...
Hope it helps. |
I'm reopening this issue in relation to #6285. Essentially, that PR would make Imagine you're the author of Geom extension and you want to (1) use the new theme-based defaults but also (2) not break your package when an older ggplot2 version is loaded. To me, one reasonable solution I can come up with is to use |
@teunbrand Deleted a comment that I wrote because I think I'm not fully caught up to all the features you have already implemented. :-) Either way, my point was that it's really important to have long times where two features overlap, the new and the old, so that there is plenty of time for extension developers to update their package. The worst is when you basically have to release your new package the day the new ggplot2 gets released but can't release even one day earlier. Finally, getting rid of |
Admittedly, the news file has accumulated a bulky section for the upcoming update :)
|
I would say if the new system that pulls defaults from the theme hasn't even been released yet in an official CRAN release then don't deprecate the old version yet. Just let them coexist for a release cycle or two. When you're the one developing the new features it can often feel like a feature has been in the codebase forever and it's time to deprecate the old approach but the vast majority of the outside world has never even seen the new approach at this time. |
This issue came up in #6084 (comment).
Briefly, now that we can do
theme(geom = element_geom(...))
, there is much less need forupdate_geom_defaults()
. Per #6084 (comment), we should ask ourselves ifupdate_geom_defaults()
should be deprecated in a future release.In my opinion, there is still a niche for
update_geom_defaults()
as one might want to swap out defaults anyway, in particular when it should affect 1 particular geom and not all of them. I sometimes (ab)use it to get geoms to accept the aesthetics I want (example). I'd therefore advise against future deprecation, but we should probably pivot from recommendingupdate_geom_defaults()
totheme(geom)
.The text was updated successfully, but these errors were encountered: