You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All themes miss some elements in their definitions (i.e., elements are implicitly set to NULL rather than explicitly set to NULL). I think all themes provided by ggplot2 should explicitly define all elements. This will become more important if we want to allow extensible themes (#2540, #2784), because we'll have to distinguish between elements a theme knows about but wants to be NULL and elements a theme doesn't know about that need to be filled in from the theme defaults. Missing element definitions also have led to unexpected problems in the past, e.g. #2724.
Elements that I notice are missing:
In all themes: some of panel.grid, panel.grid.major, panel.grid.minor, panel.grid.major.x, panel.grid.minor.x, panel.grid.major.y, panel.grid.minor.y
In theme_void(): Too many to list, including parts of axis.*, legend.*, panel.*, strip.*, plot.background.
As an aside, we should recommend as a general practice to external theme developers that they always start with an existing ggplot2 theme and then just modify the parts they want to change, just like we do in most cases:
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/
lockbot
locked and limited conversation to collaborators
May 20, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
All themes miss some elements in their definitions (i.e., elements are implicitly set to
NULL
rather than explicitly set toNULL
). I think all themes provided by ggplot2 should explicitly define all elements. This will become more important if we want to allow extensible themes (#2540, #2784), because we'll have to distinguish between elements a theme knows about but wants to beNULL
and elements a theme doesn't know about that need to be filled in from the theme defaults. Missing element definitions also have led to unexpected problems in the past, e.g. #2724.Elements that I notice are missing:
panel.grid
,panel.grid.major
,panel.grid.minor
,panel.grid.major.x
,panel.grid.minor.x
,panel.grid.major.y
,panel.grid.minor.y
theme_void()
: Too many to list, including parts ofaxis.*
,legend.*
,panel.*
,strip.*
,plot.background
.As an aside, we should recommend as a general practice to external theme developers that they always start with an existing ggplot2 theme and then just modify the parts they want to change, just like we do in most cases:
ggplot2/R/theme-defaults.r
Lines 247 to 267 in 6f5ffea
The text was updated successfully, but these errors were encountered: