
Last chance! 50% off unlimited learning
Sale ends in
tm_compass(north = 0, type = NA, fontsize = 0.8, size = NA, show.labels = 1, cardinal.directions = c("N", "E", "S", "W"), text.color = NA, color.dark = NA, color.light = NA, lwd = 1, position = NA)
"arrow"
, "4star"
, "8star"
, "radar"
, "rose"
. The default is controlled by tm_layout
(which uses "arrow"
for the default style)type
: for "arrow"
it is 2, for "4star"
and "8star"
it is 4, and for "radar"
and "rose"
it is 6.attr.color
of tm_layout
."attr.position"
of tm_layout
.current.mode <- tmap_mode("plot")
data(NLD_muni)
qtm(NLD_muni, theme = "NLD") + tm_compass()
qtm(NLD_muni, theme = "NLD") + tm_compass(type="8star")
qtm(NLD_muni, theme = "NLD") + tm_compass(type="8star")
qtm(NLD_muni, theme = "NLD") + tm_compass(type="radar", position=c("left", "top"), show.labels = 3)
# restore current mode
tmap_mode(current.mode)
Run the code above in your browser using DataLab