I'm wanting to create a ribbon plot (really it's a line plot of multiple groups of a categorical variable) but displayed in a 3d style. This would look something like this:
So maybe we would want to plot the following sample data as a ribbon plot:
set.seed(10)
fun <- function(i) data.frame(person=rep(LETTERS[i], 26),
letter=letters, count=sample(0:100, 26, T))
dat <- do.call(rbind, lapply(1:10, function(i) fun(i)))
library(ggplot2) #a traditional 2-d line plot of the data
ggplot(data=dat, aes(x=letter, y=count, group=person, color=person)) +
geom_line()
How can this be achieved in R? I know there may be better ways to display the data but my interest currently is in producing the ribbon style plot.