fix missing names in plots
This commit is contained in:
parent
61fdf76522
commit
9239f9c73e
@ -129,7 +129,9 @@ draw_plot <- function(data, casename) {
|
||||
data[[n]]$sdiv <- data[[n]]$sdiv / ISNS_PER_US
|
||||
}
|
||||
|
||||
data <- data[c('stgwoet', 'feedgeneration100', 'frafl', 'random')] # manual re-order
|
||||
order <- c('stgwoet', 'feedgeneration100', 'frafl', 'random')
|
||||
order <- c(order[order %in% names(data)], setdiff(names(data), order)) # append any missing names
|
||||
data <- data[order] # manual re-order
|
||||
data <- data[!sapply(data, is.null)] # remove NULL entries
|
||||
|
||||
wcrt = KNOWN_WCRT[[casename]]
|
||||
@ -172,7 +174,7 @@ draw_plot <- function(data, casename) {
|
||||
# lines(milines, col=MY_COLORS[[n]], lty='dashed', lwd=2) # Increase line width
|
||||
}
|
||||
|
||||
legend_names <- sapply(names(data), function(n) TOOL_TRANSLATION[[n]])
|
||||
legend_names <- sapply(names(data), function(n) if (is.null(TOOL_TRANSLATION[[n]])) {n} else {TOOL_TRANSLATION[[n]]})
|
||||
legend_colors <- c(MY_COLORS[1:length(data)],"grey","grey")
|
||||
legend_styles <- c(rep("solid",length(data)),"dotted","dashed")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user