Flake8 compatibility plot_locations2.py

Contributes to #75 and #76
Fixed minor bug in a sanity check
Flake8 compatibility plot_mpl