Re: [R] Masking oceans using polypath

2013-08-11 Thread Paul Murrell
Hi The outline for France from that database is a little bit pesky because it consists of multiple segments that travel in different directions around the French border. Here is some (possibly jetlagged) code that puts the segments all in the same direction and produces a nicer result ... b

Re: [R] Masking oceans using polypath

2013-08-05 Thread Marc Girondot
I like very much the solution proposed by Paul Murrell to mask the ocean (in fact, all that is not the country displayed) in a plot. It works pretty well for Australia. However, when I try to apply the same code for France, it fails. I search for the reason but I can't find. Here is the code fo

Re: [R] Masking oceans using polypath

2013-07-17 Thread Louise Wilson
Many thanks, this works beautifully. Louise On Wed, Jul 17, 2013 at 7:42 AM, Paul Murrell wrote: > Hi > > There are a couple of problems: > > 1. > Your 'outline' is much bigger than it needs to be. For example, the > following produces just Australia ... > > outline <- map("worldHires", region

Re: [R] Masking oceans using polypath

2013-07-16 Thread Paul Murrell
Hi There are a couple of problems: 1. Your 'outline' is much bigger than it needs to be. For example, the following produces just Australia ... outline <- map("worldHires", regions="Australia", exact=TRUE, plot=FALSE) # returns a list of x/y coords 2. The outline you get stil

[R] Masking oceans using polypath

2013-07-16 Thread Louise Wilson
Hi R-help I am trying to mask the ocean from an image plot I have made. Here is some example code: library(mapdata) image(x=110:155, y =-40:-10, z = outer(1:45, 1:30, "+"), xlab = "lon", ylab = "lat") outline <- map("worldHires", plot=FALSE) # returns a list of x/y coords xrange <- ra