-
Notifications
You must be signed in to change notification settings - Fork 0
/
poster_ggplot2_theme.R
36 lines (32 loc) · 2.74 KB
/
poster_ggplot2_theme.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
poster <- function(base_size = 10) {
require(grid)
theme(
axis.line = element_line(),
axis.text.x = element_text(colour = "black", size = base_size * 2, vjust = 1, lineheight = 0.9),
axis.text.y = element_text(colour = "black", size = base_size * 2, hjust = 1, lineheight = 0.9),
axis.ticks = element_line(colour = "black"),
axis.title.x = element_text(size = base_size*2, vjust = 0.5, face="bold"),
axis.title.y = element_text(size = base_size*2, vjust = 0.5, angle = 90, face="bold"),
axis.ticks.length = unit(0.15, "cm"),
#depricated
#axis.ticks.margin = unit(0.1, "cm"),
legend.background = element_rect(colour="white"),
legend.key = element_blank(),
legend.key.size = unit(1.2, "lines"),
legend.text = element_text(size = base_size * 0.8),
legend.title = element_text(face = "bold", size = base_size * 0.8, hjust = 0),
legend.position = "right",
panel.background = element_blank(),
panel.border = element_blank(),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.margin = unit(0.25, "lines"),
strip.background = element_rect(fill = "grey80", colour = NA),
#strip.label = function(variable, value) value,
strip.text.x = element_text(size = base_size * 0.8),
strip.text.y = element_text(size = base_size * 0.8, angle = -90),
plot.background = element_rect(fill = "white", colour = NA),
plot.title = element_text(size = base_size * 4, face="bold"),
plot.margin = unit(c(1, 1, 0.5, 0.5), "lines")
)
}