【发布时间】:2015-03-10 23:51:50
【问题描述】:
我想创建一个不是完全正方形而是矩形的地图,并且是我指定的大小。
require(ggmap)
tenmile <- get_map(location = c(lon = -122.486328, lat = 48.862813),
color = "color",
source = "google",
maptype = "roadmap",
zoom = 12)
tenmile.map <- ggmap(tenmile,
extent = "device",
ylab = "Latitude",
xlab = "Longitude")+ggtitle("GEOMean for Data from Oct 2013-Nov 2014")
tenmile.map + geom_point(data=pp, aes(x=lon, y=lat, size=geomean), color="red", alpha=0.5) +
geom_text(data=pp, aes(x=lon, y=lat, label = site), size=3, vjust = 1.25, hjust = -0.1)
我会发布我得到的东西和我想要的东西的图片,但我没有足够的声望点来发布图片。 =-(
【问题讨论】:
-
ggmap 好像没有do non-square maps,但也许你可以得到一张更大的地图,crop the image 和use it as a background。我猜对齐坐标会很痛苦,maybe here。