Graph for links
This commit is contained in:
parent
b399329e9d
commit
f4c500f22d
1 changed files with 19 additions and 3 deletions
|
@ -66,8 +66,8 @@ v4 <- ggplot(data = links_down_at_least_once2, aes(x = sorting, y=down_ratio)) +
|
||||||
#scale_y_log10() +
|
#scale_y_log10() +
|
||||||
scale_y_continuous(labels = scales::percent) +
|
scale_y_continuous(labels = scales::percent) +
|
||||||
scale_fill_grey() +
|
scale_fill_grey() +
|
||||||
ylab("down ratio") +
|
ylab("Cumulated downtime") +
|
||||||
xlab("sorting") +
|
xlab("Links sorted from most to less downtime") +
|
||||||
theme_classic()
|
theme_classic()
|
||||||
|
|
||||||
downtime <- sqldf(
|
downtime <- sqldf(
|
||||||
|
@ -83,6 +83,8 @@ where will_change='True'
|
||||||
v5 <- ggplot(data = downtime, aes(x=sorting, y=dur)) +
|
v5 <- ggplot(data = downtime, aes(x=sorting, y=dur)) +
|
||||||
geom_violin() +
|
geom_violin() +
|
||||||
scale_y_log10() +
|
scale_y_log10() +
|
||||||
|
ylab("Downtime duration (in sec)") +
|
||||||
|
xlab("Links sorted from most to less downtime") +
|
||||||
theme_classic()
|
theme_classic()
|
||||||
|
|
||||||
gobal_links <- sqldf(
|
gobal_links <- sqldf(
|
||||||
|
@ -106,10 +108,24 @@ v6 <- ggplot(data = down_group_ratio, aes(x=down_link_count, y=down_ratio)) +
|
||||||
geom_bar(stat="summary") +
|
geom_bar(stat="summary") +
|
||||||
#scale_y_log10() +
|
#scale_y_log10() +
|
||||||
scale_y_continuous(labels = scales::percent) +
|
scale_y_continuous(labels = scales::percent) +
|
||||||
|
ylab("Cumulated downtime") +
|
||||||
|
xlab("Number of links down at once") +
|
||||||
theme_classic()
|
theme_classic()
|
||||||
|
|
||||||
|
downtime_group <- sqldf(
|
||||||
|
"
|
||||||
|
select down_link_count, 1.0*durations_global/1000 as dur from gobal_links where down_link_count >= 0
|
||||||
|
")
|
||||||
|
downtime_group$down_link_count <- as.factor(downtime_group$down_link_count)
|
||||||
|
v7 <- ggplot(data = downtime_group, aes(x=down_link_count, y=dur)) +
|
||||||
|
geom_violin() +
|
||||||
|
scale_y_log10() +
|
||||||
|
ylab("Downtime duration (in sec)") +
|
||||||
|
xlab("Number of links down at once") +
|
||||||
|
theme_classic()
|
||||||
|
|
||||||
t2 <- plot_grid(v4, v5, v6, labels = c('A', 'B', 'C'), ncol=1)
|
t2 <- plot_grid(v4, v5, v6, v7, labels = c('A', 'B', 'C', 'D'), ncol=2)
|
||||||
|
t2 + ggsave("thunder_links.png", dpi=300, dev='png', height=15, width=15, units="cm")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue