-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
As discussed here:
hadley/ggplot2-book#172 (comment)
In the current code, the currently active theme set with theme_set()
etc. acts as the fallback if some element is missing from the theme provided with the plot. This is fine, except in cases where an element is missing from the currently active theme, which may happen when extension packages have added their own elements. A solution can be to add a second-level true default that is not intended to be changed by the user but that extension package could add their own elements to.
This is easy to implement, we just need to figure out the API. Do we need a full second set of functions theme_set()
, theme_get()
, theme_update()
, theme_replace()
? Or should we just provide the equivalent to theme_replace()
, e.g. theme_default_replace()
, which gives extension package authors all they need but will be sufficiently obscure that most users may never see it?