allow string keys in size legend

=> __main__ test doesn't crash anymore
Merge pull request #68 from astanin/fix/legend-main

Fix: allow string keys in size legend