Add support for legend rotation

Fix #36