地图类型=调色剂产生的地图的颜色,而不是黑色和白色

问题描述 投票:1回答:1

我有生产使用地图类型=调色剂的黑色和白色的雄蕊地图麻烦。相反,代码产生的地图是在颜色(见下文)。另外,我无法弄清楚如何控制城市和国家名称的大小,也就是不知道如何打开某些标签关闭(例如,如果我不想显示城市的名字,但希望国家名称) 。这里是我的代码:

mapbox.hud <- c(-74.2, 41, -73.5, 43)
Hudson.River <- get_map(location = mapbox.hud, source = "stamen", maptype = 
"toner", zoom=10,crop=T, force=T)
ggmap(Hudson.River)

enter image description here

r ggplot2 ggmap stamen-maps
1个回答
1
投票

尝试使用get_stamenmap

library(ggmap)
mapbox.hud <- c(-74.2, 41, -73.5, 43)
Hudson.River <- get_stamenmap(bbox=mapbox.hud, maptype="toner", zoom=10, crop=T, force=T)
ggmap(Hudson.River)

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.