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)
|
||||
|
||||
# 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) %>%
|
||||
|
||||
@@ -72,7 +73,7 @@ p = ggplot(df, aes(x=nbly, y=normalized.time, fill=sizex)) +
|
||||
facet_wrap(branch ~ .) +
|
||||
labs(y="Normalized time",
|
||||
title=sprintf("%s: normalized time", maintitle),
|
||||
subtitle=input_file) +
|
||||
subtitle=output) +
|
||||
theme(plot.subtitle=element_text(size=8))
|
||||
|
||||
ggsave("normalized.time.png", plot=p, width=w, height=h, dpi=dpi)
|
||||
@@ -87,7 +88,7 @@ p = ggplot(df, aes(x=blocksPerCpu, y=time, color=sizex)) +
|
||||
scale_x_continuous(trans=log2_trans()) +
|
||||
labs(y="Time (s)",
|
||||
title=sprintf("%s: time", maintitle),
|
||||
subtitle=input_file) +
|
||||
subtitle=output) +
|
||||
theme(plot.subtitle=element_text(size=8))
|
||||
|
||||
ggsave("time.png", plot=p, width=w, height=h, dpi=dpi)
|
||||
|
||||
Reference in New Issue
Block a user