title: How can I place a table on a plot in Matplotlib?
body: <p>I'm not having any success in getting the matplotlib table commands to work. Here's an example of what I'd like to do:</p>
  
  <p>Can anyone help with the table construction code?</p>
  
  <pre><code>import pylab as plt
  
  plt.figure()
  ax=plt.gca()
  y=[1,2,3,4,5,4,3,2,1,1,1,1,1,1,1,1]
  plt.plot([10,10,14,14,10],[2,4,4,2,2],'r')
  col_labels=['col1','col2','col3']
  row_labels=['row1','row2','row3']
  table_vals=[11,12,13,21,22,23,31,32,33]
  # the rectangle is where I want to place the table
  plt.text(11,4.1,'Table Title',size=8)
  plt.plot(y)
  plt.show()
  </code></pre>