Skip to content

Commit 12c9f92

Browse files
committed
Still label legends and facets in theme_void
While theme_void is meant for drawings or plots in which the coordinates are self describing (like maps for examples), subplots and aesthetics still need to be described. The legend itself can be removed with `guide = none` in the scale functions.
1 parent 5023b79 commit 12c9f92

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

R/theme-defaults.r

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,20 @@ theme_void <- function(base_size = 12, base_family = "") {
269269
# Use only inherited elements and make everything blank
270270
line = element_blank(),
271271
rect = element_blank(),
272-
text = element_blank(),
272+
text = element_text(
273+
family = base_family, face = "plain",
274+
colour = "black", size = base_size,
275+
lineheight = 0.9, hjust = 0.5, vjust = 0.5, angle = 0,
276+
margin = margin(), debug = FALSE
277+
),
273278
plot.margin = unit(c(0, 0, 0, 0), "lines"),
279+
axis.text.x = element_blank(),
280+
axis.text.y = element_blank(),
281+
axis.title.x = element_blank(),
282+
axis.title.y = element_blank(),
283+
legend.text = element_text(size = rel(0.8)),
284+
legend.title = element_blank(),
285+
strip.text = element_text(size = rel(0.8)),
274286

275287
complete = TRUE
276288
)

0 commit comments

Comments
 (0)