# NOT RUN {
library(ggplot2)
set.seed(123)
df <- data.frame(x = rep(1:10, 3),
y = rpois(30, 2),
group = sort(rep(c("A", "B", "C"), 10)))
ggplot(df, aes(x, y, fill = group, label = group)) +
geom_stream() +
geom_stream_label(n_grid = 100)
# }
Run the code above in your browser using DataLab