WIP: improved the generation of the graph thumbnail. It now supports the rotation.