R/40_gadm_ggplot2.R

Defines functions gadm_showScale gadm_showNorth

Documented in gadm_showNorth gadm_showScale

gadm_showNorth <- function(plot,  where="br") {
  plot + ggspatial::annotation_north_arrow(location = where, which_north = "true",
                                           height = unit(1, "cm"), width = unit(1, "cm"),
                                           pad_x = unit(0.25, "cm"),
                                           pad_y = unit(0.25, "cm"),
                                           style = ggspatial::north_arrow_fancy_orienteering)
}


gadm_showScale <- function(plot,  where="bl") {
  plot + ggspatial::annotation_scale(location = where, width_hint = 0.25)
}

Try the GADMTools package in your browser

Any scripts or data that you put into this service are public.

GADMTools documentation built on Aug. 5, 2021, 1:06 a.m.