title: Increase DPI of Matplotlib .show() in Jupyter Notebook
body: <p>I'm using Matplotlib in a Jupyter Notebook to display an image of a map. The code looks like this:</p>
  <pre><code>%matplotlib inline
  
  imgpath = './map.png'
  
  import matplotlib.pyplot as plt
  import matplotlib.image as mpimg
  import numpy as np
  
  from PIL import Image
  
  img = Image.open(imgpath)
  print(img.size)
  
  width, height = img.size
  # img.thumbnail((width * 2,height * 2), Image.ANTIALIAS)  # resizes image in-place
  imgplot = plt.imshow(img)
  plt.savefig('test.png', dpi = 300)
  </code></pre>
  <p>The problem is, although the <code>plt.savefig('test.png', dpi = 300)</code> looks fine (because I changed the dpi to 300), the image displayed in the notebook is so low resolution I can't make anything out on it, and <code>plt.imshow(img, dpi = 300)</code> doesn't work:</p>
  <p><a href="https://i.stack.imgur.com/BSXTm.png" rel="noreferrer"><img src="https://i.stack.imgur.com/BSXTm.png" alt="Image displayed in notebook" /></a></p>
  <p>So what I'm wondering is if there is a way to change the resolution of the image shown in the Jupyter Notebook?</p>