sunpy/sunpy — pull request #1048 by ayshih (2014-06-11 14:56:46+00:00)
Title: Fixing `draw_grid`

The existing implementation of `draw_grid` on maps has issues:

* Tries to estimate the what latitude and longitude range to actually bother plotting lines for, but it's a bit buggy and rather pointless since it's far simpler and more straightforward to try to draw every line
* Draws each line a ridiculous number of times with an entirely unnecessary call to `np.meshgrid`
* Uses far too few points per line (possibly motivated by performance issues resulting from the above bug), leading to awful angular curves near the limb
* Does not take advantage of occultation information to know when to not draw parts of lines that wrap to the far side of the Sun

This PR fixes all of the above.