Make the tick-hiding code agnostic to tick ordering

Ran into trouble with panning axes.
Also changed some tests to give more detailed errors to track down
the issues with the Travis builds.