title: Error: argument "map" is missing in R while plotting data in a state map
body: <p>I am trying to match the AQL value of each county in Wisconsin into the county map , and use colors to indicate AQL level. I use <code>ggplot2</code> and <code>maps</code> packages in R.</p>
  
  <p>Here is my data dataframe:</p>
  
  <pre><code>&gt; head(query)
          name      AQL  subregion
  1    Ashland 22.39474    ashland
  2      Brown 32.77049      brown
  3       Dane 36.56000       dane
  4      Dodge 34.44000      dodge
  5 Eau Claire 33.00000 eau claire
  6     Forest 19.94118     forest
  
  # Get wisconsin county map data
  &gt; county_map = map_data("county", "wisconsin")
  </code></pre>
  
  <p>I tried to use <code>geom_map()</code> as following:</p>
  
  <pre><code>p5 = ggplot(query, aes(map_id = subregion)) +
          geom_map(aes(fill = AQL, map = county_map)) +
          expand_limits(x = county_map$long, y = county_map$lat) +
          scale_fill_gradient(low = "#ff7b75", high = "#5b0300", space = "Lab")
  p5
  </code></pre>
  
  <p>Then it gets an error:</p>
  
  <blockquote>
    <p>Error in is.data.frame(map) : argument "map" is missing, with no default</p>
  </blockquote>
  
  <p>How can I solve this error? Or are there other ways to plot my <code>query</code> with <code>county_map</code>? Thanks!</p>