stacked density plot with gg plot in R
stacked density plot with gg plot in R I fail to plot correcly my stacked density chart here is my data structure data Classes ‘tbl_df’, ‘tbl’ and 'data.frame': 8517 obs. of 3 variables: $ time : num -500 -499 -498 -497 -496 -495 -494 -493 -492 -491 ... $ series: Factor w/ 17 levels "V1","V2","V3",..: 1 1 1 1 1 1 1 1 1 1 ... $ value : num 0.0788 0.0625 0.0455 0.0323 0.0426 ... and here is my code ggplot(data=data,aes(x=time, group=data$series, fill=data$series)) + geom_density(adjust=1.5, position="fill") but it plots me horizontal lines Instead I would like it plots me something like that If anyone has any idea? I would appreciate. Thanks here is my data structure dput(head(data)) structure(list(time = c(-500, -499, -498, -497, -496, -495), series = structure(c(1L, 1L, 1L, 1L, 1L, 1L), .Label = c("V1", "V2", "V3", "V4", "V5", "V6", "V7...