Jeff Sadino wrote:
Hello All,
I am trying to map the surface of TItan for a summer internship project at NASA. I would like to use matplotlib to plot, but I need to plot in West Longitude, where the left edge of the graph starts at 360 and the right edge ends at 0. Does anyone know how to do this?
Thanks much,
Jeff
Jeff: Using the basemap toolkit,
from matplotlib.toolkits.basemap import Basemap
# setup cylindrical equidistant map projection (global domain).
# resolution=None means don't bother with earth coastlines and political boundaries.
m = Basemap(llcrnrlon=0.,llcrnrlat=-90,urcrnrlon=360.,urcrnrlat=90.,resolution=None,projection='cyl')
# use plot, contour, imshow, pcolor .. methods to plot the data here
# draw parallels
delat = 30.
circles = arange(0.,90.+delat,delat).tolist()+\
arange(-delat,-90.-delat,-delat).tolist()
m.drawparallels(circles,labels=[1,0,0,1])
# draw meridians
delon = 60.
meridians = arange(-180,180,delon)
m.drawmeridians(meridians,labels=[1,0,0,1])
title('Cylindrical Equidistant')
show()
There are lots of examples in the source distribution, and a short tutorial is here
http://www.scipy.org/Cookbook/Matplotlib/Maps
HTH,
-Jeff
ยทยทยท
--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory