Commit 28314d93 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer

plotMortalityTables: Ignore 0 only for log-plots

parent e567b08c
......@@ -58,12 +58,14 @@ plotMortalityTables = function(
if (missing(xlab)) xlab = "Alter";
if (missing(ylab)) ylab = expression(paste("Sterbewahrscheinlichkeit ", q[x]));
data = subset(data, y > 0)
if (!is.null(ages)) {
data = data[data$x %in% ages,]
}
pl = ggplot(subset(data, y > 0), aes(x = x, y = y, color = group))
if (log) {
data = subset(data, y > 0)
}
pl = ggplot(data, aes(x = x, y = y, color = group))
if (!is.null(aes)) {
pl = pl + aes
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment