-
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
Inheritance of theme-based aesthetics #6285
base: main
Are you sure you want to change the base?
Conversation
@clauswilke and @yutannihilation I'd like your eyes on this and especially our bid to fully make I always really disliked that global state change that |
Just to give away one weakness of the approach; people can change specifically the colours of |
@teunbrand Don't issues such as the In principle, I think this is 100% the right direction to go. I also dislike |
I agree this is 100% the right direction! One thing I'm still unsure is how long it takes until the "ink" mechanism gets understood by the majority of ggplot2 users and the extension developers. I personally feel the trickiness @teunbrand pointed out is understandable, but we might hit more cases like that, especially on Geoms provided by the extension package. It's not visible to users which aesthetic of a Geom supports |
Thanks for taking a look Claus and Hiroaki!
Yes they can be, it just would make me slightly grumpy that there then would be 3 places where defaults are defined, which is hard to track/explain. (i. the
Thomas and I have discussed putting together a deep-dive blogpost on how to theme/style your plots, so this is definitely something that I planned to include in such post.
You can also print e.g. |
Thanks, I'm looking forward to the blog post! #5461 looks a good solution if it's possible. |
This PR is an amendment to #5833.
Briefly, we want to deprecate
update_geom_defaults()
and to do that we need to increase the flexibility of the theme based styling of geom defaults. In this PR, we include inheritance of theme-based aesthetics to allow finer customisation.In order to make this not too restrictive, we're allowing any
theme(geom.* = element_geom())
, which takes same logic in terms of theme validation.Created on 2025-01-21 with reprex v2.1.1