PEP8 fixes/protection try/except

PEP8 fixes, and part of a comment changed to a docstring.
Also added a try/except around each call to _get_pixel_distance_along_axis, so that
if something goes wrong with some off-beat transform, we just don't pad; things
revert back to old matplotlib behavior.