matplotlib-users

 [Matplotlib-users] Just an aside question on Basemap From: Mauro Cavalcanti - 2008-12-09 12:37:37 ```Dear Jeff & ALL, This is just a simple question on plotting points on Basemap (maybe it will have to be pursued further). I presume points could be plotted onto maps, no matter what projection is used -- so, I have been plotting quite well on maps using an Equirectangular projetion and one of your "classical" examples shows the plot of points on maps using an ortographic projection. However, my points are not displayed when I change the map projection, say, from Equirectangular to South Polar Stereographic, even if most of the points are well within range in the new projection. Any hints? Best regards, -- Dr. Mauro J. Cavalcanti Ecoinformatics Studio P.O. Box 46521, CEP 20551-970 Rio de Janeiro, RJ, BRASIL E-mail: maurobio@... Web: http://studio.infobio.net Linux Registered User #473524 * Ubuntu User #22717 "Life is complex. It consists of real and imaginary parts." ```
 Re: [Matplotlib-users] Just an aside question on Basemap From: Jeff Whitaker - 2008-12-09 12:42:13 ```Mauro Cavalcanti wrote: > Dear Jeff & ALL, > > This is just a simple question on plotting points on Basemap (maybe it > will have to be pursued further). I presume points could be plotted > onto maps, no matter what projection is used -- so, I have been > plotting quite well on maps using an Equirectangular projetion and one > of your "classical" examples shows the plot of points on maps using an > ortographic projection. However, my points are not displayed when I, > change the map projection, say, from Equirectangular to South Polar > Stereographic, even if most of the points are well within range in the > new projection. Any hints? > > Best regards, > > Mauro: If your points are defined in terms of longitude and latitude, you have to convert to map projection coordinates using the __call__ method of the Basemap instance, i.e. x, y = m(lon, lat) # lon,lat can be arrays, lists or scalars. m is a Basemap instance. You then pass x,y to the plot command (be it 'plot', 'scatter', 'contour' or whatever). -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 325 Broadway Boulder, CO, USA 80305-3328 ```
 Re: [Matplotlib-users] Just an aside question on Basemap From: Mauro Cavalcanti - 2008-12-09 12:55:06 ```Dear Jeff, 2008/12/9 Jeff Whitaker : > Mauro: If your points are defined in terms of longitude and latitude, you > have to convert to map projection coordinates using the __call__ method of > the Basemap instance, i.e. > > x, y = m(lon, lat) # lon,lat can be arrays, lists or scalars. m is a > Basemap instance. > > You then pass x,y to the plot command (be it 'plot', 'scatter', 'contour' or > whatever). > OK, but since this step is not necessary with the usual Equirectangular projection, I got confused. Maybe this could also be included in the documentation? Best regards, -- Dr. Mauro J. Cavalcanti Ecoinformatics Studio P.O. Box 46521, CEP 20551-970 Rio de Janeiro, RJ, BRASIL E-mail: maurobio@... Web: http://studio.infobio.net Linux Registered User #473524 * Ubuntu User #22717 "Life is complex. It consists of real and imaginary parts." ```