-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththeme_ac1.R
More file actions
29 lines (28 loc) · 978 Bytes
/
Copy paththeme_ac1.R
File metadata and controls
29 lines (28 loc) · 978 Bytes
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
# Custom ggplot theme for publication-quality figures
#
# base_family = font family (default = serif)
# base_size_a = font size for axis text (default = 12)
# base_size_t = font size for axis title text (default = 12)
#
# Example:
#
# a <- runif(1000, 0, 100)
# b <- runif(1000, 0, 100)
# dat <- data.frame(a, b)
#
# ggplot(dat, aes(x = a, y = b)) +
# geom_point() +
# theme_new()
theme_ac1 <- function(base_family = "serif", base_size_a = 12, base_size_t = 12){
theme_bw(base_family = base_family) %+replace%
theme(
plot.background = element_blank(),
panel.grid = element_blank(),
axis.text = element_text(size = base_size_a),
axis.title = element_text(size=base_size_t,face="bold"),
legend.key=element_rect(colour=NA, fill =NA),
panel.border = element_rect(fill = NA, colour = "black", size=0),
panel.background = element_rect(fill = "white", colour = "black"),
strip.background = element_rect(fill = NA)
)
}