Closed
Description
It's possible, using theme()
, to set individual font elements inline with plotting, eg (adapted from ggplot documentation example):
df <- data.frame(gp = factor(rep(letters[1:3], each = 10)), y = rnorm(30))
ggplot(df, aes(x = gp, y = y)) +
geom_point() +
theme(text=element_text(size=16))
However, when using theme_update to try to set this globally, it complains about NULL
values in the text
element.
theme_update(text=element_text(size=16))
ggplot(df, aes(x = gp, y = y)) +
geom_point()
results in
Error in FUN(X[[i]], ...) :
Theme element 'text' has NULL property: family, face, colour, hjust, vjust, angle, lineheight, margin, debug
I don't know if this is intended, but it seems strange that the behaviour of theme()
and update_theme()
is different, and it's frustrating that it isn't possible to set font size globally.
(This is with ggplot2_2.0.0
.)
Metadata
Metadata
Assignees
Labels
No labels