Mauro Cavalcanti wrote: > Dear Jeff & ALL, > > When trying to plot a set of points in Basemap using an > Equirectangular projection centered on a longitude different from the > default (using the parameter lon_0 to generate a map centered on the > desired longitude), I end up with a stange plot like the one attached > to this message (ie., all the points are plotted "over the edge of the > world"). Has Basemap been taught about the sphericity of the Earth? > (just a joke!) > > N.B. This happens no matter if I call ax.cla() (where ax is an > instance of figure.axes) and reload all the dataset after changing the > longitude. > > Any hints? >
Mauro: Say you create a cylindrical basemap with lon_0=180. The longitudinal extent of the map will be lon=0 to lon=360. If you then plot a point with a longitude of -60, it will be off the map to the left (similar to what your example plot shows). The solution is to renormalize the longitudes of the points your are plotting to be within 0 and 360 (by adding 360 if the longitude is negative). -Jeff > With warmest regards, > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. > The future of the web can't happen without you. Join us at MIX09 to help > pave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : jeffrey.s.whita...@noaa.gov 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users