-
Notifications
You must be signed in to change notification settings - Fork 0
/
plot_custom.R
88 lines (73 loc) · 3.59 KB
/
plot_custom.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
77
78
79
80
81
82
83
84
85
86
87
88
df.selection <- VK.plot[row_selected,]
if(PlotSettings$custom_style == 1){
pc <- ggplot(data = VK.plot, aes_string(x = VK.plot[,PlotSettings$custom_x], y = VK.plot[,PlotSettings$custom_y])) +
geom_point(shape = 16, alpha = PlotSettings$transparency) +
geom_vline(xintercept = df.selection[,PlotSettings$custom_x]) +
geom_hline(yintercept = df.selection[,PlotSettings$custom_y]) +
theme_bw() +
xlab(paste(PlotSettings$custom_x)) +
ylab(paste(PlotSettings$custom_y)) +
theme(legend.position = "none", legend.key = element_blank()) +
theme(panel.grid.minor = element_blank(),
panel.grid.major = element_blank(),
axis.text = element_text(size = 10),
axis.title = element_text(size = 14),
legend.title = element_blank(),
legend.text = element_text(size = 10, face = "bold"))
plot(pc)
}
if(PlotSettings$custom_style == 2){
pc <- ggplot(data = VK.plot, aes_string(x = VK.plot[,PlotSettings$custom_x], y = VK.plot[,PlotSettings$custom_y])) +
geom_point(shape = 16, aes(colour = VK.plot$composition), alpha = PlotSettings$transparency) +
geom_vline(xintercept = df.selection[,PlotSettings$custom_x]) +
geom_hline(yintercept = df.selection[,PlotSettings$custom_y]) +
scale_color_manual(values = PlotSettings$colors) +
theme_bw() +
xlab(paste(PlotSettings$custom_x)) +
ylab(paste(PlotSettings$custom_y)) +
theme(legend.position = "none", legend.key = element_blank()) +
theme(panel.grid.minor = element_blank(),
panel.grid.major = element_blank(),
axis.text = element_text(size = 10),
axis.title = element_text(size = 14),
legend.title = element_blank(),
legend.text = element_text(size = 10, face = "bold"))
plot(pc)
}
if(PlotSettings$custom_style == 3){
pc <- ggplot(data = VK.plot, aes_string(x = VK.plot[,PlotSettings$custom_x], y = VK.plot[,PlotSettings$custom_y])) +
geom_point(shape = 16, aes(size = VK.plot$relInt), alpha = PlotSettings$transparency) +
geom_vline(xintercept = df.selection[,PlotSettings$custom_x]) +
geom_hline(yintercept = df.selection[,PlotSettings$custom_y]) +
scale_size(range = PlotSettings$bubble_size) +
theme_bw() +
xlab(paste(PlotSettings$custom_x)) +
ylab(paste(PlotSettings$custom_y)) +
theme(legend.position = "none", legend.key = element_blank()) +
theme(panel.grid.minor = element_blank(),
panel.grid.major = element_blank(),
axis.text = element_text(size = 10),
axis.title = element_text(size = 14),
legend.title = element_blank(),
legend.text = element_text(size = 10, face = "bold"))
plot(pc)
}
if(PlotSettings$custom_style == 4){
pc <- ggplot(data = VK.plot, aes_string(x = VK.plot[,PlotSettings$custom_x], y = VK.plot[,PlotSettings$custom_y])) +
geom_point(shape = 16, aes(size = VK.plot$relInt, colour = VK.plot$composition), alpha = PlotSettings$transparency) +
geom_vline(xintercept = df.selection[,PlotSettings$custom_x]) +
geom_hline(yintercept = df.selection[,PlotSettings$custom_y]) +
scale_size(range = PlotSettings$bubble_size) +
scale_color_manual(values = PlotSettings$colors) +
theme_bw() +
xlab(paste(PlotSettings$custom_x)) +
ylab(paste(PlotSettings$custom_y)) +
theme(legend.position = "none", legend.key = element_blank()) +
theme(panel.grid.minor = element_blank(),
panel.grid.major = element_blank(),
axis.text = element_text(size = 10),
axis.title = element_text(size = 14),
legend.title = element_blank(),
legend.text = element_text(size = 10, face = "bold"))
plot(pc)
}