title: matplotlib: how to draw a rectangle on image
body: <p>How to draw a rectangle on an image, like this:
  <a href="https://i.stack.imgur.com/KWG46.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/KWG46.jpg" alt="enter image description here" /></a></p>
  <pre><code>import matplotlib.pyplot as plt
  from PIL import Image
  import numpy as np
  im = np.array(Image.open('dog.png'), dtype=np.uint8)
  plt.imshow(im)
  </code></pre>
  <p>I don't know how to proceed.</p>