title: raster and ggplot map not quite lining up in R
body: <p>I am trying to plot a spatial raster using <code>ggplot2</code>. </p>
  
  <pre><code>require(raster)
  require(ggplot2)
  </code></pre>
  
  <p>Download data, load as a raster using the <code>raster</code> package. More details about this data product can be found <a href="https://daac.ornl.gov/CLIMATE/guides/nitrogen_deposition.html" rel="nofollow noreferrer">here</a>. Then convert the raster to points so it plays well with <code>ggplot</code>.</p>
  
  <pre><code>system('wget https://www.dropbox.com/s/7jsdqgc9wjcdznv/NADP_wet_deposition_nh4_0.5x0.5_grid_annual_R1.txt') 
  layer&lt;- raster("path/to/raster/NADP_wet_deposition_nh4_0.5x0.5_grid_annual_R1.txt") #you need to specify your own path here, wherever the downloaded file is saved. 
  raster.points &lt;- rasterToPoints(layer)
  raster.points &lt;- data.frame(raster.points)
  colnames(raster.points) &lt;-c('x','y','layer')
  </code></pre>
  
  <p>Now use <code>ggplot2</code> to make a map, and lay over the raster.</p>
  
  <pre><code>mp &lt;- NULL
  #grab US map and choose colors
  map.US &lt;- borders("usa", colour='white',fill='black', lwd=0.4)
  mp &lt;- ggplot(data=raster.points, aes(y=y, x=x)) 
  mp &lt;- mp + map.US
  mp &lt;- mp + geom_raster(aes(fill=layer)) 
  mp &lt;- mp + theme(axis.text.y=element_blank(),
                  axis.text.x=element_blank(),
                  axis.title.y=element_blank(),
                  axis.title.x=element_blank(),
                  axis.ticks=element_blank(), 
                  panel.background = element_rect(fill='black'),
                  plot.background = element_rect(fill='black'),
                  panel.grid.major=element_blank(),
                  panel.grid.minor=element_blank())
  mp
  </code></pre>
  
  <p>The output looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/d0Jz7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d0Jz7.png" alt="enter image description here"></a></p>
  
  <p>As you can see, things <em>almost</em> line up, but not quite. everything is shifted slightly to the right. What may be causing this and how can I fix it? </p>