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:
@@ -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), verbose=FALSE) %>%
|
||||
@@ -39,7 +40,7 @@ w=6
|
||||
p = ggplot(data=df, aes(x=size, y=medianLatency)) +
|
||||
labs(x="Message size", y="Median latency (µs)",
|
||||
#title=sprintf("OSU benchmark: osu_latency", nodes, tasksPerNode, cpusPerTask),
|
||||
subtitle=gsub("-", "\uad", input_file)) +
|
||||
subtitle=gsub("-", "\uad", output)) +
|
||||
geom_line(aes(linetype=unitName)) +
|
||||
geom_point(aes(shape=unitName), size=2) +
|
||||
scale_y_log10(breaks = breaks, minor_breaks = minor_breaks) +
|
||||
@@ -59,7 +60,7 @@ ggsave("median-lines.pdf", plot=p, width=w, height=h, dpi=ppi)
|
||||
p = ggplot(data=df, aes(x=size, y=latency)) +
|
||||
labs(x="Size (bytes)", y="Latency (us)",
|
||||
#title=sprintf("OSU benchmark: osu_latency", nodes, tasksPerNode, cpusPerTask),
|
||||
subtitle=input_file) +
|
||||
subtitle=output) +
|
||||
geom_line(aes(y=medianLatency, linetype=unitName, group=unitName)) +
|
||||
geom_point(aes(shape=unitName), size=2) +
|
||||
scale_y_log10(breaks = breaks, minor_breaks = minor_breaks) +
|
||||
|
||||
Reference in New Issue
Block a user