[R] World plots and clipping regions

Ray Brownrigg Ray.Brownrigg at ecs.vuw.ac.nz
Sun Mar 27 22:29:11 CEST 2011


Not with the code as it is provided.  However with a reasonably easy
modification to map.grid() (to return the coordinates of the red dotted
line) and a call to polygon(), what you want can be achieved.

Let me know if you need further details.

Ray Brownrigg

On 03/26/11 10:11, Saptarshi Guha wrote:
> Hello,
> 
> Given the following display
> 
> library(maps)
> library(mapproj)
> 
> m <- map('world',plot=FALSE)
> map('world',proj='mollweide',bg=bgcolor[2],col='white')
> map.grid(col=2,lim=c(-175,-175,-180,180),label=FALSE,lty=2)
> 
> Is there a way to color the region outside the dotted red border?
> 
> Thank you
> Saptarshi



More information about the R-help mailing list