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:
@@ -7,6 +7,7 @@ library(viridis, warn.conflicts = FALSE)
|
||||
# Load the arguments (argv)
|
||||
args = commandArgs(trailingOnly=TRUE)
|
||||
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) %>%
|
||||
jsonlite::flatten() %>%
|
||||
@@ -38,7 +39,7 @@ p = ggplot(df, aes(x=blocksize, y=normalized.time, color=branch)) +
|
||||
facet_wrap(~ branch) +
|
||||
theme_bw() +
|
||||
labs(x="Blocksize", y="Normalized Time", title="NBody Granularity: Normalized Time",
|
||||
subtitle=input_file) +
|
||||
subtitle=output) +
|
||||
theme(plot.subtitle=element_text(size=8)) +
|
||||
theme(legend.position="bottom") +
|
||||
theme(legend.text = element_text(size=7))
|
||||
@@ -52,7 +53,7 @@ p = ggplot(df, aes(x=blocksize, y=time)) +
|
||||
geom_boxplot() +
|
||||
theme_bw() +
|
||||
labs(x="Blocksize", y="Time (s)", title="NBody Granularity: Time",
|
||||
subtitle=input_file) +
|
||||
subtitle=output) +
|
||||
theme(plot.subtitle=element_text(size=8)) +
|
||||
theme(legend.position="bottom") +
|
||||
theme(legend.text = element_text(size=7))
|
||||
|
||||
@@ -8,6 +8,7 @@ library(stringr)
|
||||
# Load the arguments (argv)
|
||||
args = commandArgs(trailingOnly=TRUE)
|
||||
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) %>%
|
||||
jsonlite::flatten() %>%
|
||||
@@ -60,7 +61,7 @@ p = ggplot(df, aes(x=blocksize, y=normalized.time, color=interleaveMem)) +
|
||||
labs(x="Blocksize", y="Normalized time",
|
||||
title=sprintf("NBody NUMA (%s | %d Nodes): Normalized time",
|
||||
branch, nodes),
|
||||
subtitle=input_file) +
|
||||
subtitle=output) +
|
||||
theme(plot.subtitle=element_text(size=8)) +
|
||||
theme(legend.position="bottom")
|
||||
|
||||
@@ -77,7 +78,7 @@ p = ggplot(df, aes(x=blocksize, y=time, color=interleaveMem)) +
|
||||
labs(x="Blocksize", y="Time (s)",
|
||||
title=sprintf("NBody NUMA (%s | %d Nodes): Time",
|
||||
branch, nodes),
|
||||
subtitle=input_file) +
|
||||
subtitle=output) +
|
||||
theme(plot.subtitle=element_text(size=8)) +
|
||||
theme(legend.position="bottom")
|
||||
|
||||
|
||||
@@ -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)) %>%
|
||||
@@ -79,7 +80,7 @@ p = ggplot(data=D, aes(x=blocksPerCpuFactor, y=tnorm, color=bad)) +
|
||||
# Labels
|
||||
labs(x="Blocks/CPU", y="Normalized time",
|
||||
title=sprintf("Nbody normalized time. Particles=%d", particles),
|
||||
subtitle=input_file) +
|
||||
subtitle=output) +
|
||||
|
||||
|
||||
# Center the title
|
||||
@@ -117,7 +118,7 @@ p1 = ggplot(D, aes(x=blocksizeFactor, y=time)) +
|
||||
|
||||
labs(x="Blocksize", y="Time (s)",
|
||||
title=sprintf("Nbody granularity. Particles=%d", particles),
|
||||
subtitle=input_file) +
|
||||
subtitle=output) +
|
||||
theme_bw() +
|
||||
theme(plot.subtitle=element_text(size=8)) +
|
||||
#theme(legend.position = c(0.5, 0.8)) +
|
||||
@@ -138,7 +139,7 @@ p2 = ggplot(D, aes(x=blocksPerCpuFactor, y=time)) +
|
||||
|
||||
labs(x="Blocks/CPU", y="Time (s)",
|
||||
title=sprintf("Nbody granularity. Particles=%d", particles),
|
||||
subtitle=input_file) +
|
||||
subtitle=output) +
|
||||
theme_bw() +
|
||||
theme(plot.subtitle=element_text(size=8)) +
|
||||
|
||||
|
||||
@@ -8,6 +8,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)) %>%
|
||||
@@ -50,7 +51,7 @@ p = ggplot(data=D, aes(x=blocksPerCpuFactor, y=tnorm)) +
|
||||
# Labels
|
||||
labs(x="Blocks/CPU", y="Normalized time",
|
||||
title=sprintf("Nbody normalized time. Particles=%d", particles),
|
||||
subtitle=input_file) +
|
||||
subtitle=output) +
|
||||
|
||||
# Center the title
|
||||
#theme(plot.title = element_text(hjust = 0.5)) +
|
||||
@@ -95,7 +96,7 @@ p = ggplot(D, aes(x=blocksPerCpuFactor, y=time, color=freeCpu)) +
|
||||
|
||||
labs(x="Blocks/CPU", y="Time (s)",
|
||||
title=sprintf("Nbody granularity. Particles=%d", particles),
|
||||
subtitle=input_file) +
|
||||
subtitle=output) +
|
||||
theme_bw() +
|
||||
theme(plot.subtitle=element_text(size=8)) +
|
||||
theme(legend.position = c(0.5, 0.88)) +
|
||||
|
||||
@@ -8,6 +8,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)) %>%
|
||||
@@ -52,7 +53,7 @@ p = ggplot(data=D, aes(x=nblocks, y=tnorm)) +
|
||||
# Labels
|
||||
labs(x="Num blocks", y="Normalized time",
|
||||
title=sprintf("Nbody normalized time. Particles=%d", particles),
|
||||
subtitle=input_file) +
|
||||
subtitle=output) +
|
||||
|
||||
# Center the title
|
||||
#theme(plot.title = element_text(hjust = 0.5)) +
|
||||
@@ -96,7 +97,7 @@ p = ggplot(D, aes(x=blocksPerCpu, y=time, color=jemalloc)) +
|
||||
|
||||
labs(x="Blocks/CPU", y="Time (s)",
|
||||
title=sprintf("Nbody granularity. Particles=%d", particles),
|
||||
subtitle=input_file) +
|
||||
subtitle=output) +
|
||||
theme_bw() +
|
||||
theme(plot.subtitle=element_text(size=8)) +
|
||||
theme(legend.position = c(0.5, 0.88)) +
|
||||
|
||||
@@ -8,6 +8,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)) %>%
|
||||
@@ -53,7 +54,7 @@ p = ggplot(data=D, aes(x=blocksPerCpuFactor, y=tnorm, color=bad)) +
|
||||
# Labels
|
||||
labs(x="Blocks/CPU", y="Normalized time",
|
||||
title=sprintf("Nbody normalized time. Particles=%d", particles),
|
||||
subtitle=input_file) +
|
||||
subtitle=output) +
|
||||
|
||||
|
||||
# Center the title
|
||||
@@ -94,7 +95,7 @@ p = ggplot(D, aes(x=blocksPerCpuFactor, y=time)) +
|
||||
|
||||
labs(x="Blocks/CPU", y="Time (s)",
|
||||
title=sprintf("Nbody granularity. Particles=%d", particles),
|
||||
subtitle=input_file) +
|
||||
subtitle=output) +
|
||||
theme_bw() +
|
||||
theme(plot.subtitle=element_text(size=8)) +
|
||||
theme(legend.position = c(0.5, 0.88)) +
|
||||
|
||||
@@ -7,6 +7,7 @@ library(viridis, warn.conflicts = FALSE)
|
||||
# Load the arguments (argv)
|
||||
args = commandArgs(trailingOnly=TRUE)
|
||||
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) %>%
|
||||
jsonlite::flatten() %>%
|
||||
@@ -41,7 +42,7 @@ p = ggplot(df, aes(x=nodes, y=normalized.time, color=branch)) +
|
||||
facet_wrap(~ branch) +
|
||||
theme_bw() +
|
||||
labs(x="Nodes", y="Normalized time (s)", title="NBody Scaling: Normalized Time",
|
||||
subtitle=input_file) +
|
||||
subtitle=output) +
|
||||
theme(plot.subtitle=element_text(size=5)) +
|
||||
theme(legend.position="bottom") +
|
||||
theme(legend.text = element_text(size=7))
|
||||
@@ -56,7 +57,7 @@ p = ggplot(df, aes(x=nodes, y=time.nodes, color=branch)) +
|
||||
geom_line(aes(y=median.time.nodes, group=branch)) +
|
||||
theme_bw() +
|
||||
labs(x="Nodes", y="Time * nodes (s)", title="NBody Scaling: Time * nodes",
|
||||
subtitle=input_file) +
|
||||
subtitle=output) +
|
||||
theme(plot.subtitle=element_text(size=5)) +
|
||||
theme(legend.position="bottom") +
|
||||
theme(legend.text = element_text(size=7))
|
||||
|
||||
Reference in New Issue
Block a user