Changing layout to not layout ticks whose gridline is slightly offscreen.