Repository navigation
User-defined theme elements - #2741
Conversation
hadley
left a comment
There was a problem hiding this comment.
Looks good.
I had a possible crazy idea - can we make the set of valid aesthetics and the set of valid theme elements a theme setting? That would allow us to use an existing plot-local way of modifying defaults.
|
Let me ponder this. Making the valid theme elements a theme setting might require solving some technical challenges but I think it makes sense conceptually. For the valid aesthetics, I'm a bit concerned about orthogonality. It might create a zoo of different themes that only differ in the aesthetics they support, e.g. |
|
Yeah, and providing valid aesthetics as a theme component makes them a plot level setting, which will make mingling geoms from different packages potentially complex. Maybe layers should have a property that allows you to define extra aesthetics? |
|
I'll go ahead and merge this because I think this reorganization makes sense regardless of how we proceed. I'll move the discussion of the various possibilities to the respective issues. |
|
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
This is the first step towards user-defined theme elements as discussed in #2540. This particular PR doesn't add any features yet, it just reorganizes the code so that global variables live in an environment. It could be merged as is, but mostly I'd want quick feedback to make sure I'm on the right track.