Fix 'endpoint' problem; avoid resampling the gridline positions.
Merge pull request #196 from pp-mo/gridlines_fix

Avoid resampling of gridline positions.