added ability to generate legends
Merge pull request #29 from elliottregan/master

added ability to generate legends