r - Remove white space from levelplot plotting Google map -


i'm trying rid of white space produced levelplot in rastervis package. i'm using dismo package google map, using levelplot plot it. however, there thin strip of white around map. how remove white space?

library(dismo) library(rastervis)  g_map = gmap(extent(c(-79,-58,36,50)),type="satellite",zoom=7,lonlat=true,scale=1)   g_map_lv = levelplot(g_map,maxpixel=ncell(g_map),col.regions=g_map@legend@colortable,at=0:255,panel=panel.levelplot.raster,interpolate=true,colorkey=false,margin=false,scales="sliced") 

enter image description here

the outer rows , columns of g_map object na. example:

g_map[1,1] 

you can remove them trim before plotting:

g_map <- trim(g_map) 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -