Description
This idea has been floated around multiple times but I'll raise it again. Currently, themes do not affect the geom properties, such as point and line colour, etc. Scales, in particular colour and fill, suffer the same issue.
Users who wish to use a specific theme – theme_dark() is a striking example – end up having to change the geom and/or scale defaults. A consistent yet original look, such as a company's brand, may require to set default colour schemes for discrete and continuous scales.
These two steps currently require adding multiple manual parameters to each plot, or fiddling around with the awkward combination of set_geom_defaults()
and scale_colour_discrete <- scale_colour_brewer
.
The suggestion made here is to consider default aesthetics an integral part of the grammar – they're not mapped to data (unless they are), but should be consistent with the overall look of the theme. Themes have gained in consistency with rel()
and inheritance, but at the moment setting a dark background will make points invisible: not a great default behaviour.
Lattice, as well as Julia's Gadfly, seem to have followed this line of thought to include geom defaults in the theme description. Beamer themes define default colour schemes to be inherited by slide elements.
A proof-of principle, setting point colours to default to the plot title's colour (an existing theme element, for simplicity), was implemented here. (Note: the use of complex numbers is just for curiosity – it would correspond to something like waiver()
in the standard ggplot2 way of dealing with values that are to be resolved just before rendering.