Fixes obvious bugs in the matching (and extended it to 2 axes)

... still needs readjusting to major ticks if available