title: pandas, matplotlib, use dataframe index as axis tick labels
body: <p>I am using matplotlib's <code>imshow()</code> function to show a <code>pandas.DataFrame</code>. </p>
  
  <p>I would like the labels and ticks for both x and y axes to be drawn from the DataFrame.index and DataFrame.columns lists, but I can't figure out how to do it.</p>
  
  <p>Assuming that <code>data</code> is a <code>pandas.DataFrame</code>:</p>
  
  <pre><code>&gt;&gt;&gt; print data
  &lt;class 'pandas.core.frame.DataFrame'&gt;
  Index: 201 entries,  1901 to  2101
  Data columns:
  jan    201  non-null values
  feb    201  non-null values
  mar    201  non-null values
  apr    201  non-null values
  may    201  non-null values
  jun    201  non-null values
  jul    201  non-null values
  aug    201  non-null values
  sep    201  non-null values
  oct    201  non-null values
  nov    201  non-null values
  dec    201  non-null values
  </code></pre>
  
  <p>When I do this:</p>
  
  <pre><code>ax1 = fig.add_subplot(131, xticklabels=data.columns, yticklabels=data.index)
  ax1.set_title("A")
  ax1.tick_params(axis='both', direction='out')
  im1 = ax1.imshow(data, 
                   interpolation='nearest', 
                   aspect='auto',
                   cmap=cmap )
  </code></pre>
  
  <p>I end up with nicely spaced tick labels on the y axis of the image, but the labels are 1901-1906 instead of 1901 thru 2101. Likewise, the x axis tick labels are feb-jul instead of jan-dec.</p>
  
  <p>If I use </p>
  
  <pre><code>ax1 = fig.add_subplot(131) # without specifying tick labels
  </code></pre>
  
  <p>Then I end up with the axis tick labels simply being the underlying ndarray index values (i.e. 0-201 and 0-12). I don't need to modify the spacing or quantity of ticks and labels, I just want the label text to come from the DataFrame index and column lists. Not sure if I am missing something easy or not?</p>
  
  <p>Thanks in advance.</p>