-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme_Publication.R
76 lines (72 loc) · 3.22 KB
/
theme_Publication.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#######################
# Alessandra Valcarcel
# Plot to publication ready ggplot2 figures
# October 10, 2017
#######################
theme_Publication <- function(base_family="Arial", leg.position, leg.direction) {
(theme_foundation(base_family=base_family)
+ theme(plot.title = element_text(face = "bold",
size = 30, hjust = 0.5),
text = element_text(),
plot.caption=element_text(size=22),
panel.background = element_rect(colour = NA),
plot.background = element_rect(colour = NA),
panel.border = element_rect(colour = NA),
axis.title = element_text(),
axis.title.y = element_text(angle=90,vjust =2, size = 24),
axis.title.x = element_text(vjust = -0.2, size = 24),
axis.text = element_text(),
axis.text.x = element_text(size = 24),
axis.text.y = element_text(size = 24),
axis.line = element_line(colour="black"),
axis.ticks = element_line(),
panel.grid.major = element_line(colour="#f0f0f0"),
panel.grid.minor = element_blank(),
legend.key = element_rect(colour = NA),
legend.position = leg.position,
legend.direction = leg.direction,
legend.key.size= unit(1, "cm"),
legend.margin = unit(0, "cm"),
legend.title = element_text(face="italic", size = 24),
plot.margin=unit(c(10,5,5,5),"mm"),
strip.background=element_rect(colour="#f0f0f0",fill="#f0f0f0"),
strip.text = element_text(face="bold")
))
}
# #######################
# # Alessandra Valcarcel
# # Plot to publication ready ggplot2 figures
# # October 10, 2017
# #######################
#
# theme_Publication <- function(base_family="Arial", leg.position, leg.direction) {
# (theme_foundation(base_family=base_family)
# + theme(plot.title = element_text(face = "bold",
# size = 18, hjust = 0.5),
# text = element_text(),
# plot.caption=element_text(size=12),
# panel.background = element_rect(colour = NA),
# plot.background = element_rect(colour = NA),
# panel.border = element_rect(colour = NA),
# axis.title = element_text(),
# axis.title.y = element_text(angle=90,vjust =2, size = 12),
# axis.title.x = element_text(vjust = -0.2, size = 12),
# axis.text = element_text(),
# axis.text.x = element_text(size = 12),
# axis.text.y = element_text(size = 12),
# axis.line = element_line(colour="black"),
# axis.ticks = element_line(),
# panel.grid.major = element_line(colour="#f0f0f0"),
# panel.grid.minor = element_blank(),
# legend.key = element_rect(colour = NA),
# legend.position = leg.position,
# legend.direction = leg.direction,
# legend.key.size= unit(1, "cm"),
# legend.margin = unit(0, "cm"),
# legend.title = element_text(face="italic", size = 12),
# plot.margin=unit(c(10,5,5,5),"mm"),
# strip.background=element_rect(colour="#f0f0f0",fill="#f0f0f0"),
# strip.text = element_text(face="bold")
# ))
#
# }