title: R raster avoid white space when plotting
body: <p>I have an image and i want to plot only 100*100 square with left hand bottom corner at 0,0.
  when i use below commands. Why do i get a white space around my cropped image?
  how can i avoid it and ensure that I get exact 100*100 image?</p>
  
  <p>If you want to repeat my example, you can use any image on line 1 (provided that the image is bigger than 100*100 pixels)</p>
  
  <pre><code>r &lt;- raster("C:/Users/nnnn/Desktop/geo.jpg")
  vector= getValues(r)
  plot(r)
  r
  
  
  par(mar=c(0,0,0,0))
  par(oma=c(0,0,0,0))
  par(mai=c(0,0,0,0))
  par(omi=c(0,0,0,0))
  plot(r,xlim=c(0,100),ylim=c(0,100),legend=FALSE,axes=FALSE)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Jgt1E.jpg" alt="enter image description here"></p>