-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest_background.R
More file actions
63 lines (60 loc) · 2.22 KB
/
test_background.R
File metadata and controls
63 lines (60 loc) · 2.22 KB
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
library(tidyverse)
library(ggthemes)
theme_timelineEDB <- function() {
ret <- theme_solarized(base_family = "serif",
base_size = 11,
light = FALSE) +
theme(
axis.text = element_text(colour = "white", size = 10),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
panel.grid.major = element_line(
colour = "gray50",
size = 0.3,
linetype = "longdash"
),
panel.grid.minor = element_line(
colour = "gray40",
size = 0.2,
linetype = "dotdash"
),
legend.key = element_rect(fill = "transparent", colour = NA),
legend.background = element_rect(fill = "transparent", colour = NA),
panel.background = element_blank(),
plot.background = element_blank()
)
ret
}
theme_timelineEDB2 <- function(){
ret <- theme_bw(base_family = "serif", base_size = 11) +
theme(text = element_text(colour = "white", size = 10),
title = element_text(color = "white"),
line = element_line(colour = "#272B30"),
rect = element_rect(fill = "#272B30", color = NA),
axis.ticks = element_line(color = "#586e75"),
axis.line = element_line(color = "#586e75", linetype = 1),
axis.text = element_text(colour = "white", size = 10),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
legend.background = element_rect(fill = NULL, color = NA),
legend.key = element_rect(fill = NULL, colour = NULL, linetype = 0),
panel.background = element_rect(fill = "#272B30", colour = NA),
#panel.border = element_rect(fill = "#272B30", colour = NULL, linetype = 0),
panel.grid = element_line(color = "#272B30"),
panel.grid.major = element_line(
colour = "gray50",
size = 0.3,
linetype = "longdash"
),
panel.grid.minor = element_line(
colour = "gray40",
size = 0.2,
linetype = "dotdash"
),
plot.background = element_rect(fill ="#272B30", colour = "#272B30", linetype = 0)
)
ret
}
ggplot(mtcars, aes(hp)) +
geom_histogram(fill = "yellow") +
theme_timelineEDB2()