title: How to add a text into a Rectangle?
body: <p>I have a code that draws hundreds of small rectangles on top of an image : </p>
  
  <p><img src="https://i.imgur.com/slSP2kn.png" alt="example"></p>
  
  <p>The rectangles are instances of </p>
  
  <pre><code>    matplotlib.patches.Rectangle
  </code></pre>
  
  <p>I'd like to put a text (actually a number) into these rectangles, I don't see a way to do that. matplotlib.text.Text seems to allow one to insert text surrounded by a rectangle however I want the rectangle to be at a precise position and have a precise size and I don't think that can be done with text().</p>