title: matplotlib - autosize of text according to shape size
body: <p>I'm adding a text inside a shape by:
  <code>ax.text(x,y,'text', ha='center', va='center',bbox=dict(boxstyle='circle', fc="w", ec="k"),fontsize=10)</code> (ax is AxesSubplot)</p>
  
  <p>The problem is that I couldn't make the circle size constant while changing the string length. I want the text size adjust to the circle size and not the other way around.
  The circle is even completely gone if the string is an empty one.</p>
  
  <p>The only bypass to the problem I had found is dynamically to set the fontsize param according to the len of the string, but that's too ugly and not still the circle size is not completely constant.</p>
  
  <p><strong>EDIT (adding a MVCE):</strong></p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  fig = plt.figure()
  ax = fig.add_axes([0,0,1,1])
  
  ax.text(0.5,0.5,'long_text', ha='center', va='center',bbox=dict(boxstyle='circle', fc="w", ec="k"),fontsize=10)
  ax.text(0.3,0.7,'short', ha='center', va='center',bbox=dict(boxstyle='circle', fc="w", ec="k"),fontsize=10)
  
  plt.show()
  </code></pre>
  
  <p>Trying to make both circles the same size although the string len is different. Currently looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/FMYaW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FMYaW.png" alt="enter image description here"></a></p>