SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Larsen, J. <jl...@dm...> - 2008年08月29日 20:13:07
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
From: Jeff W. <js...@fa...> - 2008年08月29日 22:22:57
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 : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /