oswaldosantos/ggsn

scalebar on all facets

Closed this issue · 1 comments

If I want to keep the scalebar on all facets, text appears in a weird way:

library(ggsn); library(sf)
dsn <- system.file('extdata', package = 'ggsn')

# Map in geographic coordinates
map <- st_read(dsn, 'sp', quiet = TRUE)

(ggm1 <- ggplot(map, aes(fill = nots)) +
    geom_sf() +
    scale_fill_brewer(name = 'Animal abuse\nnotifications', palette = 8))

ggm1 +
  blank() +
  facet_grid(~nots) + 
  north(map) +
  scalebar(map, dist = 5, dd2km = TRUE, model = 'WGS84')

facets

Please, try with ggsn v0.4.10:

ggm1 +
  blank() +
  facet_grid(~nots) + 
  north(map) +
  scalebar(map, dist = 5, dd2km = TRUE, model = 'WGS84', facet.var = 'nots')