title: Rotate tick labels in subplot (Pyplot, Matplotlib, gridspec)
body: <p>I am attempting to rotate the x labels of a subplot (created using GridSpec) by 45 degrees. I have tried using <code>axa.set_xticks()</code> and <code>axa.set_xticklabels</code>, but it does not seem to work. Google wasn't helping either, since most questions concerning labels are about normal plots, and not subplots. </p>
  
  <p>See code below:</p>
  
  <pre><code>width = 20                                    # Width of the figure in centimeters
  height = 15                                   # Height of the figure in centimeters
  w = width * 0.393701                            # Conversion to inches
  h = height * 0.393701                           # Conversion to inches
  
  f1 = plt.figure(figsize=[w,h])
  gs = gridspec.GridSpec(1, 7, width_ratios = [1.5, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0])
  
  axa = plt.subplot(gs[0])
  axa.plot(dts, z,'k', alpha=0.75, lw=0.25)
  #axa.set_title('...')
  axa.set_ylabel('TVDSS ' + '$[m]$', fontsize = '10' )
  axa.set_xlabel('slowness 'r'$[\mu s/m]$', fontsize = '10')
  axa.set_ylim(245, 260)
  axa.set_xlim(650, 700)
  axa.tick_params(labelsize=7)
  axa.invert_yaxis()
  axa.grid()
  </code></pre>
  
  <p>Any help will be greatly appreciated!</p>