I am using the ggseqplot package to visualize sequential data, however, I cannot add a count label to each stack. Following is my code:
ggseqdplot(biofam.seq, border = T) +
scale_fill_discrete_sequential("PuBuGn")+
scale_x_discrete() +
labs(x = "Path Number") +
theme(legend.position = "right") +
theme_minimal()
This sample dataset can be used:
data(biofam)
biofam <- biofam[sample(nrow(biofam),300),]
biofam.lab <- c("Parent", "Left", "Married", "Left+Marr",
"Child", "Left+Child", "Left+Marr+Child", "Divorced")
biofam.seq <- seqdef(biofam, 10:25, labels=biofam.lab)
How can I add a count data label to each stack of this plot.
