library(maps)
library(ggplot2)
world<-map_data('world')
sf<-data.frame(long=-122.26,lat=37.47)
p <- ggplot(legend=FALSE) +
geom_polygon( data=world, aes(x=long, y=lat,group=group)) +
opts(panel.background = theme_blank()) +
opts(panel.grid.major = theme_blank()) +
opts(panel.grid.minor = theme_blank()) +
opts(axis.text.x = theme_blank(),axis.text.y = theme_blank()) +
opts(axis.ticks = theme_blank()) +
xlab("") + ylab("")
# add a single point
p <- p + geom_point(data=sf,aes(long,lat),colour="green",size=4)
p
Note: Since version 0.9.2 opts
has been replaced by theme
. So for example, opts(panel.background = theme_blank())
would become theme(panel.background = element_blank())
.