help with maps : center on the dateline

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

help with maps : center on the dateline

Melanie Abecassis
Hi,
I'm trying to plot a map of the pacific ocean, centered on the dateline, using the maps package.


library(maps) # Basic library to draw maps
library(mapdata)# Library with specialized maps
library(mapproj)

map(database = "world", fill = TRUE, col = 1, plot = TRUE,add=F,  
xlim = c(120,300), ylim = c(-20,40))


I tried several different combinations of coordinates, but whatever I try, it doesn't plot anything past the dateline.
Is there a way to plot a map like the one attached, with this package ?

thanks !

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: help with maps : center on the dateline

Duncan Murdoch
On 11/7/2008 12:08 PM, [hidden email] wrote:

> Hi,
> I'm trying to plot a map of the pacific ocean, centered on the dateline, using the maps package.
>
>
> library(maps) # Basic library to draw maps
> library(mapdata)# Library with specialized maps
> library(mapproj)
>
> map(database = "world", fill = TRUE, col = 1, plot = TRUE,add=F,  
> xlim = c(120,300), ylim = c(-20,40))
>
>
> I tried several different combinations of coordinates, but whatever I try, it doesn't plot anything past the dateline.
> Is there a way to plot a map like the one attached, with this package ?

Use the world2 (or world2Hires, from mapdata) database.

Duncan Murdoch

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.