-
Notifications
You must be signed in to change notification settings - Fork 49
/
random-coloring.R
27 lines (25 loc) · 910 Bytes
/
random-coloring.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
library(debug)
library(ggplot2)
data <- read.csv('random-coloring-data.csv', header=T, sep=',')
png("random-coloring.png", width=1600, height=900)
ggplot(data=data, aes(x=n, y=time, col=index)) +
geom_point() +
geom_smooth() +
scale_color_discrete(name="Method",
labels=c("Backtracking",
"Foward checking",
"Min-conflicts")) +
scale_x_continuous(name="n") +
scale_y_continuous(name="Time (s)")
dev.off()
png("random-coloring-no-outliers.png", width=1600, height=900)
ggplot(data=data, aes(x=n, y=time, col=index)) +
geom_point() +
geom_smooth() +
scale_color_discrete(name="Method",
labels=c("Backtracking",
"Foward checking",
"Min-conflicts")) +
scale_x_continuous(name="n") +
scale_y_continuous(name="Time (s)", limits=c(0, 1.5))
dev.off()