I can get a \"filled\" geom_line with either geom_ribbon or geom_area. Is there an equivalent for geom_step that doesn\'
I know the question is a few years old, but I had the same problem today. For reference here's my solution. It's not more concise than the original answer, but may be easier to understand for some.
library(ggplot2)
library(dplyr)
df <- data.frame(x = seq(10), y = sample(10))
df_areaStep <- bind_rows(old = df,
new = df %>% mutate(y = lag(y)),
.id = "source") %>%
arrange(x, source)
ggplot(df, aes(x,y)) +
geom_ribbon(aes(x = x, ymin = 0, ymax = y), data = df_areaStep)
See this gist for longer version with comments.