Fix gridline issue with missing axis label

The axis was searching for "line." as a selector, but ending in a . is
not a valid search method.
I think this will still fail if there are spaces or special characters in the axis label.