Support for stacked graph

Closes #24