Re: [R-sig-Geo] image background for spplot of gridded data

2013-12-10 Thread Agustin Lobo
and would it possible a similar plot using contourplot() (or levelplot()) overlaid on a gmap? I've tried the equivalent to the stamen.R function that you refer to: contourplot(rinvmod2goog,zscaleLog=TRUE, at=my.at,colorkey=myColorkey,margin=FALSE,add=TRUE) +

Re: [R-sig-Geo] image background for spplot of gridded data

2013-12-10 Thread Oscar Perpiñan
It works for me using rinvmod2lonlat (long-lat coordinates). Oscar. - Oscar Perpiñán Lamigueiro Grupo de Sistemas Fotovoltaicos (IES-UPM) Dpto. Ingeniería Eléctrica (ETSIDI-UPM) URL: http://oscarperpinan.github.io Twitter:

Re: [R-sig-Geo] image background for spplot of gridded data

2013-12-10 Thread Agustin Lobo
Yes, it does for me as well: I had messed with the parameters of the map in the original function. Here I've made a page showing what I do and what I get: https://dl.dropboxusercontent.com/u/3180464/contourOngmap_log.html Is it possible doing the reverse, overlaying the contour on top of the map

Re: [R-sig-Geo] image background for spplot of gridded data

2013-12-10 Thread Oscar Perpiñan
Try this: rinvmod2Ext - extend(rinvmod2lonlat, with(bbMap2, c(ll.lon, ur.lon, ll.lat, ur.lat))) contourplot(rinvmod2Ext, zscaleLog=TRUE, margin=FALSE) + layer(grid.raster(gmap2, x=lonCenter2, y=latCenter2, width=width2,

Re: [R-sig-Geo] image background for spplot of gridded data

2013-12-10 Thread Agustin Lobo
Yes! I also noticed that making a custom box for the plot is not straightforward because the user cannot set the box in get_map. I've managed to do it using the extend() trick. html updated https://dl.dropboxusercontent.com/u/3180464/contourOngmap_log.html Thanks! Agus On Tue, Dec 10, 2013 at

Re: [R-sig-Geo] image background for spplot of gridded data

2013-11-20 Thread Oscar Perpiñan
Hi, For the sake of completeness: just a few days ago I received a comment to a post about spplot and ggmap (http://procomun.wordpress.com/2013/04/24/stamen-maps-with-spplot/). There I was using a SpatialPointsDataFrame object. Because of that comment I posted another example with

Re: [R-sig-Geo] image background for spplot of gridded data

2013-11-19 Thread Waichler, Scott R
I was told, among other things, to look for previous messages by Oscar that would explain how to do this. Here is Oscar's solution that I found to work for the case where you want to plot two rasters that have different extents. In my case, gmap is a satellite image obtained with RgoogleMaps,

[R-sig-Geo] image background for spplot of gridded data

2013-11-15 Thread Waichler, Scott R
Hi, I have a map tile from RgoogleMaps that I want to use as a background image for an spplot of gridded data, where the data will be plotted with an alpha value 1. I am unable to plot them together. I was going to set up an example with meuse.grid, but I couldn't get CRS() to work with