How to remove the margins from a ggmap

Viewed 4872

I was trying to plot a map using ggmap package without any margin, axis, labels, etc. I was able to remove the labels, and axis but have no idea have to remove the margin here. Any help will be appreciated..!

library("ggmap")
amap <- get_map(location = c(lon = -95.3632715, lat = 29.7632836), maptype = c("terrain"))
basemap <- ggmap(amap)
plot(basemap)
3 Answers
library("ggmap")
amap <- get_map(location = c(lon = -95.3632715, lat = 29.7632836), 
    maptype = c("terrain"))
basemap <- ggmap(amap) + 
theme(axis.line = element_line(color = NA)) + 
xlab("") + ylab("")
basemap 
Related