r - Is it possible to overlay base graphics on ggmap plots? -


i'm resistant ggplot. don't think looks nicer base graphics, can't complete replacement given various statistical functions have default methods call base graphics, , yet unnecessary syntax takes time learn. also, stringing statements pluses?!?! /rant

i appreciate functionality in ggmap. want overlay base graphics on maps download ggmap, ideally without hacks first downloading , saving maps images, loading , using background.

is possible use base graphics ggmap?

library(ggplot2) library(ggmap) map<-get_map(location="sanfrancisco",zoom=12, color = 'bw') plot(map) x <- c(-122.3957, -122.4240, -122.4129, -122.4034, -122.3965, -122.4082) y <- c(37.78892, 37.76317, 37.78535, 37.78764, 37.77833, 37.78736) locs <- data.frame(x,y) with(locs, points(x, y)) 

no joy. perhaps if convert spatialpoints data frame?

library(sp) coordinates(locs)<- ~x+y points(locs) 

still no joy


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -