-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
It doesn't seem possible to set the legend.box.background
theme setting under theme_void()
. Other legend settings work.
Reprex:
library(ggplot2)
df <- data.frame(x = 1:3)
ggplot(df, aes(x, x, color = factor(x))) +
geom_point() +
theme_void() +
theme(legend.background = element_rect(fill = "gray80"))
df <- data.frame(x = 1:3)
ggplot(df, aes(x, x, color = factor(x))) +
geom_point() +
theme_void() +
theme(legend.box.background = element_rect(fill = "gray80"))
#> Warning in if (theme$legend.box == "horizontal") {: the condition has
#> length > 1 and only the first element will be used
#> Warning in if (theme$legend.box == "vertical") {: the condition has length
#> > 1 and only the first element will be used
#> Error in gtable_add_cols(guides, theme$legend.box.margin[4], pos = 0): is.gtable(x) is not TRUE
Created on 2018-06-28 by the reprex package (v0.2.0).
Metadata
Metadata
Assignees
Labels
No labels