Fixes #1721: Can't sort an iterator
Merge pull request #1721 from mdboom/issue_1721

rcParams.keys() is not Python 3 compatible