How can I implement Streamgraphs in R?
Streamgraphs are a variant of stacked graphs and an improvement on Havre et al.'s ThemeRiver in the way the baseline is chosen, layer ordering, and color choice.
Example:
Reference: http://www.leebyron.com/else/streamgraph/
I wrote a solution using
lattice::xyplot
. The code is at my spacetimeVis repository.The next example use this data set:
It produces this image.
xyplot
needs two functions to work:panel.flow
andprepanel.flow
: