|
From: Jeff W. <js...@fa...> - 2008-12-08 13:13:21
|
Mauro Cavalcanti wrote:
> Dear Jeff,
>
> 2008/12/7 Jeff Whitaker <js...@fa...>:
>
>> Mauro: Just set the llrncrlat,urcrnrlon appropriately. For instance,
>> llcrnrlon=0, urcrnrlon=360 will produce a map centered on the dateline while
>> llcrnrlon=-180, urcrnrlon=180 will produce a map centered on Greenwich.
>>
>
> Thanks! I had not figured out that the decimal coordinates used by
> Basemap range from 0 to 360 (and not just from -180 to 180). Using
> this tip, I could also create a map centered on the Indian Ocean. BTW,
> by varying the llcrnrlat and urcrnrlat, can one also create maps
> centered on the North and South poles using a Equirectangular
> projection?
>
Mauro: I realized that this is actually possible with the Cassini
projection (the transverse aspect of the cylindrical equidistant).
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
width=20000000
m = Basemap(lon_0=0,lat_0=0,projection='cass',\
width=0.75*width,height=2*width)
m.drawcoastlines()
m.fillcontinents(color='coral',lake_color='aqua')
m.drawparallels(range(-80,81,21))
m.drawmeridians(range(-180,181,60))
m.drawmapboundary(fill_color='aqua')
plt.show()
Don't know why you would actually do it though, if you want to show
polar regions you should probably use the polar stereographic maps
(npstere, spstere).
-Jeff
> With best regards,
>
>
--
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328
|