title: How to add title, x axis label and y axis label while using .subplot in matplotlib?
body: <p>I have a dateframe called <code>for_plot</code> and I am using the following snippet of code to make a bar diagram:</p>
  
  <pre><code>import matlplotlib.pyplot as plt
  f, ax = plt.subplots(1,1,figsize=(10,8))
  x_1 = for_plot['res_code'] - 0.2
  x_2 = for_plot['res_code']
  pre = for_plot['n_indnota_pre']
  post = for_plot['n_indnota_post']
  ax.bar(x_1,pre, width = 0.2, color = 'red')
  ax.bar(x_2,post, width = 0.2, color = 'green')
  ax.set_xticks([0.9,1.9,2.9])
  ax.set_xticklabels(['GEN','ST','SC'])
  ax.legend(['pre_nota', 'post_nota'],loc = 1)
  
  ax.xlabel('Constituency Type')
  ax.ylabel('No of Independent Candidates')
  ax.title('Average No Of Independent Candidates by Constituency Type')
  
  plt.show()
  </code></pre>
  
  <p>I do understand how to work around with matplotlib but I have a few questions on the nuances:</p>
  
  <ol>
  <li>What does <code>f</code> in line 1 of the snippet do? As the snippet stands, what do <code>f</code> and <code>ax</code> represent? </li>
  <li>I am not able to add the axes labels and chart title (as in the last 4 lines of the snippet) using <code>ax.xlabel('Constituency Type')</code> but while drawing other figures, If I don't call <code>subplot()</code> in the first line and use <code>plt.xlabel('Constituency Type')</code>, it works absolutely fine. Why does it behave this way?</li>
  </ol>
  
  <p>I get the following error:</p>
  
  <pre><code>AttributeError: 'AxesSubplot' object has no attribute 'xlabel'
  </code></pre>
  
  <p>Edit 1: </p>
  
  <pre><code>f.xlabel('Constituency Type')
  f.ylabel('No of Independent Candidates')
  f.title('Average No Of Independent Candidates by Constituency Type')
  </code></pre>
  
  <p>Doesn't work either.</p>
  
  <pre><code>AttributeError:'Figure' object has no attribute 'xlabel'
  </code></pre>