[R-sig-Geo] Maps across the dateline

Anne Hertel ahertel at atmos.uiuc.edu
Thu Jan 19 18:25:10 CET 2006


I'm trying to plot some data for the Pacific Ocean and want to get a map onto my plot as well. I'm using the function 'map()' from library(maps). However, I cannot get it to plot anything across the dateline since it requires that longitudes between 180 and 360 degrees east to be written as negative degrees east of Greenwich (e.g. -180 to 0 degrees east). The longitudes I want to plot are 135 to 255 degrees east but the function map() wants that to be written 135 to 180 degrees east and -180 to -105 degrees east, so I would have to divide the grid up in two. But even if I do that I can't plot it together because -180 doesn't come after 180.

Does anyone have a way to plot something across the dateline? I only want a map of the Pacific, not the rest of the world.

Anne Hertel

Anne M. K. Hertel
Grad. Student & Research Assistant
Department of Atmospheric Sciences
University of Illinois at Urbana-Champaign
Annex II, room 204
Phone: (217) 333 6296

More information about the R-sig-Geo mailing list