title: Subplot date formatting in Axis
body: <p>I have a 2x2 graph with date in x-axis in both graphs. I have used <code>datetime.strptime</code> to bring a <em>string</em> into <code>type = datetime.datetime</code> object format. </p>
  
  <p>However I am planning to have some 12 subplots and doing this the following way seems messy. </p>
  
  <p>Is there a better 'pythonic' way?</p>
  
  <p>This is what I have:</p>
  
  <pre><code> xx.xaxis.set_major_formatter(mdates.DateFormatter('%d/%m/%y %H:%M'))
   plt.grid(True)
   plt.ylabel('paramA',fontsize=8, color = "blue")
   plt.tick_params(axis='both', which='major', labelsize=8)
   plt.plot(date_list, myarray[:,0], '-b', label='paramA')
   plt.setp(plt.xticks()[1], rotation=30, ha='right') # ha is the same as horizontalalignment
  
   xx = plt.subplot(2,1,2)
   xx.xaxis.set_major_formatter(mdates.DateFormatter('%d/%m/%y %H:%M'))
   plt.grid(True)
   plt.ylabel('paramB', 'amount of virtual mem',fontsize=8, color = "blue")
   plt.tick_params(axis='both', which='major', labelsize=8)
   plt.plot(date_list, myarray[:,1], '-y', label='paramB')plt.setp(plt.xticks()[1], rotation=30, ha='right') # ha is the same as horizontalalignment ```
  
  </code></pre>
  
  <p>PS:  Initially I tried defining the plot as follows. This however did not work:</p>
  
  <pre><code>fig, axs = plt.subplots(2,1,figsize=(15,15)) 
  plt.title('My graph')     
  for ax in enumerate(axs):
     ax.xaxis.set_major_formatter(mdates.DateFormatter('%d/%m/%y %H:%M:%S'))
  </code></pre>