Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## Re: [Matplotlib-users] Plotting in West Longitude

 Re: [Matplotlib-users] Plotting in West Longitude From: Jeff Whitaker - 2006-07-28 22:01:45 ```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@... 325 Broadway Office : Skaggs Research Cntr 1D-124 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg ```

 [Matplotlib-users] Plotting in West Longitude From: Jeff Sadino - 2006-07-26 16:51:11 ```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 ```
 Re: [Matplotlib-users] Plotting in West Longitude From: PGM - 2006-07-27 17:27:36 ```HI, There are series like that... > 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? Assuming you have a plot (not an image): xlim(360,0) or gca.set_xlim(360,0) HIH, P. ```
 Re: [Matplotlib-users] Plotting in West Longitude From: Jeff Whitaker - 2006-07-28 22:01:45 ```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@... 325 Broadway Office : Skaggs Research Cntr 1D-124 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg ```