On Thu, 15 Apr 2010, Víctor Homar Santaner wrote:
> Anyone?
>
The answer appears to be "no".

Going back to your original question though, you could just not fill the map.  
I.e.
filled.contour(x,y,z,levels=c(2,4,6,8,10),plot.axes=map("worldHires",add=T))

Otherwise, you may have to do things the 'hard way': set up two regions, draw a 
map in the 
first, (here you can then use polygon to colour the ocean green, then overlay 
the map 
again), overlay your filled contour (perhaps again using polygon), then set up 
the legend 
in the other region.

Hope this helps,
Ray Brownrigg

On Wed, 14 Apr 2010, Víctor Homar Santaner originally wrote:
> Dear R helpers,
>
> Any suggestion on how to make the 2D gaussian to show up ON TOP of the map,
> instead of below the continents?
>
> Example code:
>
> library(mapdata)
>
> x<-seq(-15,15,.2);y<-seq(30,55,.2)
>
> expone<-function(x,y){10*exp(-sqrt(x*x+(y-40)*(y-40))/2)}
> z<-outer(x,y,expone)
>
> filled.contour(x,y,z,levels=c(2,4,6,8,10),plot.axes=map("worldHires",add=T,
>col="lightgrey",fill=T))
>
>
> Also, any idea on how to fill the ocean with a background color (e.g.
> green)?
>
>
> Best regards and thank you,
>
> Víctor.

______________________________________________
R-help@r-project.org 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 via email to