add run in gdb menu action
This commit is contained in:
24
charts/single_scatter.r
Normal file
24
charts/single_scatter.r
Normal file
@ -0,0 +1,24 @@
|
||||
library(ggplot2)
|
||||
|
||||
# Usage: Rscript single_scatter.r exp_abspath
|
||||
|
||||
args <- commandArgs(trailingOnly = TRUE)
|
||||
experiment <- args[1]
|
||||
datafile <- paste(experiment, "/faults.csv", sep = "")
|
||||
|
||||
if (!file.exists(datafile)) {
|
||||
print(paste("Input file", datafile, "is missing"))
|
||||
stop()
|
||||
}
|
||||
|
||||
data <- readr::read_csv(datafile)
|
||||
data$fault_address <- strtoi(data$fault_address)
|
||||
tibble::glimpse(data)
|
||||
|
||||
plot <- ggplot(data, aes(x = fault_address, y = faults)) +
|
||||
geom_point() +
|
||||
scale_y_log10() +
|
||||
labs(x = "Address", y = "Faults") +
|
||||
theme_minimal()
|
||||
|
||||
ggsave(paste(experiment, "/scatter.svg", sep = ""), plot = plot)
|
||||
Reference in New Issue
Block a user