You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is quite ok, as now lines will be contiguous. Unfortunately, the latitude data is not shifted, and the results are exactly what is shown above.
If you shift both latitudes and longitudes by:
lons, lats = m.shiftdata(lon, lat)
and use the shifted version to plot the data, everything is fine.
To my eye it seems that there is some hassle with the decorator _transform1d used around plot and scatter methods. Monkey-patching this (init.py, lines 3239 and 3277 in today's git) by changing the decorator into _transform should help, but it may break other functionality in plot and scatter.
I think the best solution is to sort the data before plotting by using shiftdata as above. (And of course to file a bug report.)
This is migrated from matplotlib/matplotlib#3404
There is a bug with point shifting when using
latlon=True
inBasemap.plot()
, as discussed on http://stackoverflow.com/questions/25471723/plotting-on-a-basemap-unexpected-result/25472915: for instance, see the following codeOutput:

The red points should all coincide with the blue and green ones, but they don't.
The text was updated successfully, but these errors were encountered: