[Matplotlib-users] Negative aspect ratios in basemap From: Larsen, Jesper - 2008-08-29 20:13 Attachments: Message as HTML ```Hi matplotlib-users, I have an application in which regions that are not known beforehand are defined and plotted. When the application plots a region a Basemap instance is created. My datasets define longitudes from 0 to 360. When regions cross the Greenwich meridian I try to make a Basemap like this: m = Basemap(350, -10, 10, 10) print m.aspect But this results in negative aspect ratios. How would you handle that? Will I have to make extra checks for whether the region crosses the 0 meridian and add 360 to all longitudes > 0 or do you have a better solution? (i.e. create m = Basemap(350, -10, 370, 10)) Regards, Jesper ```
 Re: [Matplotlib-users] Negative aspect ratios in basemap From: Jeff Whitaker - 2008-08-29 22:22 ```Larsen, Jesper wrote: > > Hi matplotlib-users, > > I have an application in which regions that are not known beforehand > are defined and plotted. When the application plots a region a Basemap > instance is created. My datasets define longitudes from 0 to 360. When > regions cross the Greenwich meridian I try to make a Basemap like this: > > m = Basemap(350, -10, 10, 10) > print m.aspect > > But this results in negative aspect ratios. How would you handle that? > Will I have to make extra checks for whether the region crosses the 0 > meridian and add 360 to all longitudes > 0 or do you have a better > solution? > > (i.e. create m = Basemap(350, -10, 370, 10)) > Jesper: Yes, that should work fine. -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg ```