在下面的代码中,我如何为
tm_compass()
设置背景颜色和透明度,就像我可以为地图标题做的那样?library(tmap)
library(dismo)
ny.map <- gmap(x = "New York", zoom = 13, type = "satellite")
print(tm_shape(shp = ny.map) +
tm_raster() +
tm_compass(position = c("right", "top"),
type = "4star",
show.labels = 2) +
tm_layout(title = "New York",
title.bg.color = "white",
title.bg.alpha = 0.5))
tm_text()
需要参数bg.color
和bg.alpha
,而希望tm_compass()
有类似的东西。你的方法暂时可行。谢谢。 - Manojit