STY: pep8 fixes to legend