Adding a table after a Python matplotlib basemap
<p>I am creating a map using matplotlib basemap and I want to add a table underneath it (say 4 colums, 4 rows) with text in the cells (the text and table is not linked in any way to the basemap). I have not been able to do so with subplots. This is saved as a 1 page pdf. Any suggestions?</p>

<pre><code>from mpl_toolkits.basemap import Basemap
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt

fig = plt.figure(figsize=(11.69*2, 8.27*2), dpi=120)
fig.add_axes([0.1,0.1,0.8,0.8])
map = Basemap(projection='merc', lat_0=57, lon_0=-135, resolution = 'l', area_thresh = 10000, llcrnrlon=-110, llcrnrlat=-50, urcrnrlon=150, urcrnrlat=60)
# A lot of map calls drawing the map
plt.savefig('map.pdf', bbox_inches='tight')
</code></pre>

<p>Create two subplots and add a table to the second axe object? See the documentation for <code>Axes.table()</code></p>

<p><a href="http://matplotlib.org/api/axes_api.html?highlight=table#matplotlib.axes.Axes.table" rel="nofollow">http://matplotlib.org/api/axes_api.html?highlight=table#matplotlib.axes.Axes.table</a></p>

<blockquote>
  <p>table(**kwargs) Add a table to the current axes.</p>
  
  <p>Call signature:</p>
  
  <p>table(cellText=None, cellColours=None,
        cellLoc='right', colWidths=None,
        rowLabels=None, rowColours=None, rowLoc='left',
        colLabels=None, colColours=None, colLoc='center',
        loc='bottom', bbox=None): Returns a matplotlib.table.Table instance. </p>
  
  <p>For finer grained control over tables, use the Table class
  and add it to the axes with add_table().</p>
</blockquote>

python matplotlib matplotlib-basemap