Archived
1
0
forked from rarias/bscpkgs

fig: use the $out path in the subtitle

The input dataset is not enough to determine which script produced a
given plot.
This commit is contained in:
2021-04-21 13:40:25 +02:00
parent 5a49611bf6
commit 92cd88e365
28 changed files with 88 additions and 61 deletions

View File

@@ -9,6 +9,7 @@ args = commandArgs(trailingOnly=TRUE)
# Set the input dataset if given in argv[1], or use "input" as default
if (length(args)>0) { input_file = args[1] } else { input_file = "input" }
if (length(args)>1) { output = args[2] } else { output = "?" }
df = jsonlite::stream_in(file(input_file), verbose=FALSE) %>%
@@ -51,7 +52,7 @@ p = ggplot(df, aes(x=blocksize, y=normalized.time)) +
facet_wrap(branch ~ .) +
labs(y="Normalized time",
title=sprintf("%s: normalized time", main_title),
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("normalized.time.png", plot=p, width=w, height=h, dpi=dpi)
@@ -65,7 +66,7 @@ p = ggplot(df, aes(x=blocksize, y=time, color=branch)) +
theme_bw() +
labs(y="Time (s)",
title=sprintf("%s: time", main_title),
subtitle=input_file) +
subtitle=output) +
theme(legend.position="bottom") +
theme(plot.subtitle=element_text(size=8))

View File

@@ -9,6 +9,7 @@ args=commandArgs(trailingOnly=TRUE)
# Read the timetable from args[1]
input_file = "input.json"
if (length(args)>0) { input_file = args[1] }
if (length(args)>1) { output = args[2] } else { output = "?" }
# Load the dataset in NDJSON format
dataset = jsonlite::stream_in(file(input_file)) %>%
@@ -48,7 +49,7 @@ p = ggplot(df, aes(x=nodes, y=time, group=enableIO, color=enableIO)) +
geom_line() +
theme_bw() +
labs(x="Nodes", y="Time (s)", title="FWI strong scaling for mpi+send+oss+task",
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.88))
@@ -68,7 +69,7 @@ p = ggplot(df, aes(x=nodes, y=nxtime, group=enableIO, color=enableIO)) +
geom_line() +
theme_bw() +
labs(x="Nodes", y="Time * Nodes (s)", title="FWI strong scaling for mpi+send+oss+task",
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8)) +
theme(legend.position = c(0.5, 0.88))
@@ -88,7 +89,7 @@ dev.off()
# geom_line() +
# theme_bw() +
# labs(x="Nodes", y="Median Time (s)", title="FWI strong scaling",
# subtitle=input_file) +
# subtitle=output) +
# theme(plot.subtitle=element_text(size=8)) +
# theme(legend.position = c(0.5, 0.88))
#
@@ -108,7 +109,7 @@ dev.off()
# geom_line() +
# theme_bw() +
# labs(x="Nodes", y="Median Time * Nodes (s)", title="FWI strong scaling",
# subtitle=input_file) +
# subtitle=output) +
# theme(plot.subtitle=element_text(size=8)) +
# theme(legend.position = c(0.5, 0.88))
#

View File

@@ -9,6 +9,7 @@ args = commandArgs(trailingOnly=TRUE)
# Set the input dataset if given in argv[1], or use "input" as default
if (length(args)>0) { input_file = args[1] } else { input_file = "input" }
if (length(args)>1) { output = args[2] } else { output = "?" }
df = jsonlite::stream_in(file(input_file), verbose=FALSE) %>%
@@ -57,7 +58,7 @@ p = ggplot(df, aes(x=nodes, y=normalized.time)) +
facet_wrap(branch ~ .) +
labs(x="nodes", y="Normalized time",
title=sprintf("%s: normalized time", main_title),
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("normalized.time.png", plot=p, width=w, height=h, dpi=dpi)
@@ -72,7 +73,7 @@ p = ggplot(df, aes(x=nodes, y=time, color=gitBranch)) +
# facet_wrap(branch ~ .) +
labs(y="Time (s)",
title=sprintf("%s: time", main_title),
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("time.png", plot=p, width=w, height=h, dpi=dpi)
@@ -87,7 +88,7 @@ p = ggplot(df, aes(x=nodes, y=time.nodes, color=branch)) +
#facet_wrap(branch ~ .) +
labs(x="nodes", y="Time * nodes (s)",
title=sprintf("%s: time * nodes", main_title),
subtitle=input_file) +
subtitle=output) +
theme(plot.subtitle=element_text(size=8))
ggsave("time.nodes.png", plot=p, width=w, height=h, dpi=dpi)