title: How do I supress the background plot for a multi-panel plot?
body: <p>I want to make a multi-panel plot, with a map in background &amp; then add points. But the background plot is always plotted separately first, which i would like to avoid.</p>
  <p>This is my function</p>
  <pre><code>png(filename = paste0(path_figures, &quot;no2.png&quot;), height = 25, width = 18, units = &quot;cm&quot;, res = 1080)
  
  layout(matrix(c(1,2,3,4), byrow = T))
  
  plotAUT = function(Region, Data, Stations, Range, Season, CB = TRUE, ...){
    
    # background map
    plot(map(regions = Region), type=&quot;l&quot;, ...)
    
    # define colours
    colour = inferno((length(Range)-1))
    
    for (i in 1:length(Data)) {
      C = &quot;white&quot;
      
      if (Season == &quot;DJF&quot;){
      for (j in 1:(length(Range)-1)) {
        if(between(no2_DJF[i], Range[j], Range[j+1], incbounds=TRUE)){
          C = colour[j]
        }else{
          next()
        }
       }
      }
  </code></pre>
  <p><em>omitted the other else if statements checking for seasons</em></p>
  <pre><code>    # plotting points on map
      points(loc$station_longitude_deg[i], loc$station_latitude_deg[i], pch=21, bg=C, lwd=1.5)
    }
  
    # add colourbar
    if(CB == TRUE){
      set.colorbar(cbx = c(17.47664, 17.82569), cby = c(46.2940, 49.11994), pal = colour, ticks = Range)
    }else{
      next()
    }
    
  }
  </code></pre>
  <p>Now if i call the the function i get this output</p>
  <p><a href="https://i.stack.imgur.com/gBkIf.png" rel="nofollow noreferrer">multi-panel plot but with the map plotted separately</a></p>