This repository was archived by the owner on Jan 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot.R
More file actions
58 lines (46 loc) · 2.19 KB
/
Copy pathplot.R
File metadata and controls
58 lines (46 loc) · 2.19 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
# plot.R
###############################################################################
# Copyright (C) 2017 Alexis Janon
#
# This code is part of a program computing task lists for
# heterogeneous scheduling problems.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
###############################################################################
d <- read.csv("results_plot.csv", sep=";", header=T)
d <- d[d$TIME < 800,]
d$TYPE[d$TYPE==0] <- "new"
d$TYPE[d$TYPE==1] <- "random"
d$TYPE[d$TYPE==2] <- "min_work"
d2 <- d
d <- d[d$GROUP==16,]
library("ggplot2")
p_res <- ggplot( d[d$TASK_COUNT==100 & d$CPU_A==10 & d$CPU_B==10 | d$CPU_A==100 & d$CPU_B==100,], aes(x=SUM_L, y=LAMBDA) )
p_res + geom_point(aes(colour=TYPE, shape=TYPE)) + facet_wrap(~ CPU_A + CPU_B)
ggsave("plot_lambda1.png", width=2*par("din")[1])
p_res2 <- ggplot( d[d$TASK_COUNT==100 & d$CPU_A==100 & d$CPU_B==10,], aes(x=SUM_L, y=LAMBDA) )
p_res2 + geom_point(aes(colour=TYPE, shape=TYPE)) + facet_wrap(~ CPU_A + CPU_B)
ggsave("plot_lambda2.png")
p_res3 <- ggplot( d[d$TASK_COUNT==1000 & d$CPU_A==100 & d$CPU_B==10,], aes(x=SUM_L, y=LAMBDA) )
p_res3 + geom_point(aes(colour=TYPE, shape=TYPE)) + facet_wrap(~ CPU_A + CPU_B)
ggsave("plot_lambda3.png")
p_res4 <- ggplot( d[d$TASK_COUNT==10 & d$CPU_A==100 & d$CPU_B==10,], aes(x=SUM_L, y=LAMBDA) )
p_res4 + geom_point(aes(colour=TYPE, shape=TYPE)) + facet_wrap(~ CPU_A + CPU_B)
ggsave("plot_lambda4.png")
p_time <- ggplot( d2[d2$TASK_COUNT==100,], aes(x=TYPE, y=TIME) )
p_time + geom_boxplot()
ggsave("plot2.png")
p_time <- ggplot( d2[d2$TASK_COUNT==1000,], aes(x=TYPE, y=TIME) )
p_time + geom_boxplot()
ggsave("plot3.png")