title: Turn off Matplotlib imshow interpolation when saved as PDF
body: <p>Is there a way to turn off the interpolation of Matplotlib's imshow function when saved as PDF? </p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Running the following code:</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  image = np.random.random((200,200))
  plt.imshow(image, interpolation='nearest')
  plt.savefig('image.pdf')
  </code></pre>
  
  <p>will create a PDF that looks like:</p>
  
  <p><a href="https://i.stack.imgur.com/WkZ1f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WkZ1f.png" alt="enter image description here"></a></p>
  
  <p>Zooming in will reveal that the 'pixels' are interpolated:</p>
  
  <p><a href="https://i.stack.imgur.com/FtaFU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FtaFU.png" alt="enter image description here"></a></p>
  
  <p>Is there a way to turn the interpolation off? I am using Matplotlib 2.0.2 and Python 2.7.13.</p>
  
  <p>Thanks!</p>