Plotting a wrapped path in Basemap
<p>I am trying to plot a satellite ground track. I have a list of latitudes and longitudes in degrees. The longitude values are all from -180 to +180 deg. My first issue is with using the <code>latlon</code> keyword (by the way, I'm using this in Julia via the <code>PyCall.jl</code> package, so forgive the weird-looking syntax):</p>

<pre><code>map = Basemap.Basemap(projection="mill",lon_0=0)
map[:drawcoastlines]()
map[:drawparallels](-90:30:90,labels=[1,0,0,0])
map[:drawmeridians](map[:lonmin]:60:map[:lonmax]+30,labels=[0,0,0,1])
map[:plot](lon,lat,color="red",latlon=true)
</code></pre>

<p><a href="https://i.stack.imgur.com/foaB1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/foaB1.png" alt="Weird plot"></a></p>

<p>This is... not what that should look like. I'm not really sure what the problem is. However, if I convert to map coordinates first:</p>

<pre><code>xx,yy = map(lon,lat) 
map[:plot](xx,yy,color="red")
</code></pre>

<p><a href="https://i.stack.imgur.com/lxLFx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lxLFx.png" alt="Better plot"></a></p>

<p>This is much better, <em>except</em> for the line at the point that the longitude wraps from +180 to -180. Any suggestions for making this look nicer?</p>

<p>The latitude, longitude pairs (in degrees) used for generating these plots can be found <a href="http://pastebin.com/UwnwCgFe" rel="nofollow noreferrer">here</a>.</p>