title: Add a scale bar and a north arrow outside of the plot area of a facetted map plot
body: <p>I wish to add a scale bar and a north arrow outside of the plot area of a facetted map plot.
  As an example, consider the following facetted map plot, as seen in a blog post by Max Marchi (<a href="http://www.milanor.net/blog/maps-in-r-plotting-data-points-on-a-map/" rel="noreferrer">link</a>):</p>
  
  <pre><code># Load the data
  airports &lt;- read.csv("https://raw.githubusercontent.com/jpatokal/openflights/master/data/airports.dat", header = FALSE)
  colnames(airports) &lt;- c("ID", "name", "city",
    "country", "IATA_FAA", "ICAO", "lat", "lon",
     "altitude", "timezone", "DST")
  
  routes &lt;- read.csv("https://github.com/jpatokal/openflights/raw/master/data/routes.dat", header = FALSE)
  colnames(routes) &lt;- c("airline", "airlineID",
    "sourceAirport", "sourceAirportID",
    "destinationAirport", "destinationAirportID",
    "codeshare", "stops", "equipment")
  
  # Getting the data ready for plotting
  # * For a detailed explanation on setting up the data I suggest consulting Max Marchi's post: 
  # http://www.milanor.net/blog/maps-in-r-plotting-data-points-on-a-map/
  library(plyr)
  departures &lt;- ddply(routes, .(sourceAirportID), "nrow")
  names(departures)[2] &lt;- "flights"
  arrivals &lt;- ddply(routes, .(destinationAirportID), "nrow")
  names(arrivals)[2] &lt;- "flights"
  airportD &lt;- merge(airports, departures, by.x = "ID", 
                    by.y = "sourceAirportID")
  airportA &lt;- merge(airports, arrivals, by.x = "ID", 
                    by.y = "destinationAirportID")
  airportD$type &lt;- factor("departures")
  airportA$type &lt;- factor("arrivals")
  
  # The final data frame used for plotting
  airportDA &lt;- rbind(airportD, airportA)
  
  # Get the map of Europe from Google Maps
  library(ggmap)
  map &lt;- get_map(location = 'Europe', zoom = 4)
  
  # Make a facetted map plot 
  library(ggplot2)
  facet.gmap &lt;- ggmap(map) +
    geom_point(aes(x = lon, y = lat, 
    size = sqrt(flights)), 
    data = airportDA, alpha = .5) +
    scale_size(breaks = sqrt(c(1, 5, 10, 50, 100, 500)), 
    labels = c(1, 5, 10, 50, 100, 500), name = "routes") + 
    theme(legend.position = "bottom",
          legend.direction="horizontal") +
    guides(size=guide_legend(nrow=1)) +  
    facet_wrap( ~ type, ncol=2)  
  facet.gmap
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/x24rS.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/x24rS.jpg" alt="enter image description here"></a>
  I wish to add a scale bar and a north arrow outside of the plot area, at the right side of the plot legend for instance, to obtain something like this:</p>
  
  <p><a href="https://i.stack.imgur.com/ZLfWd.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/ZLfWd.jpg" alt="enter image description here"></a></p>
  
  <p>I tried using the <code>scalebar</code> and <code>north</code> functions of the <code>ggsn</code> package, however these functions only allow adding scale bars and north arrows inside of the plot area. My attempts using these functions are as follows:</p>
  
  <pre><code># Adding a scale bar (but can't positioned it outside of the plot area)
  library(ggsn)
  bb &lt;- attr(map, "bb")
  bb2 &lt;- data.frame(long = unlist(bb[c(2, 4)]), lat = unlist(bb[c(1,3)]))
  
  scale.bar &lt;- facet.gmap +
    scalebar(data = bb2, dist = 250, dd2km = TRUE, 
      model  = "WGS84",
      st.size=2.5,
      height=0.015,  
      location = "topleft",
      facet.var='airportDA$type',
      facet.lev='departures', 
      anchor = c(
        x = bb$ll.lon + 0.05 * (bb$ur.lon - bb$ll.lon), 
        y = bb$ll.lat + 0.9 * (bb$ur.lat - bb$ll.lat) )) 
  scale.bar
  
  # Adding a north arrow (but can't positioned it outside of the plot area)
  north2(scale.bar,x=0.12,y=0.90, scale=0.09, symbol=3) 
  </code></pre>
  
  <p>Does anyone have any suggestion? Thanks in advance.</p>