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
{{ message }}
Repository navigation
Suggestion: rel-class can inherit value from unit-class theme elements #3951
I know rel objects are not really supported as theme elements on their own, but since the size argument in element_line/rect/text() can take a rel object and inherit the (modified) value from the parent, it doesn't seem like too far a stretch to have child rel theme elements.
Suppose you'd like your legend keys to be half as tall as usual, it would be neat if you could do the following:
library(ggplot2)
ggplot(iris, aes(Sepal.Length, Sepal.Width)) +
geom_point(aes(colour=Species)) +
theme(legend.key.height= rel(0.5))
#> Error: Theme element `legend.key.height` must be an `unit` object.
Activity
thomasp85 commentedon Apr 30, 2020
I don't see any problem in allowing this, though I can not say when we will add it