title: Formatting string ticklabels matplotlib
body: <p>I have a set of ticklabels that are strings on my x axis, and I want to be able to get -> modify -> set them. Say for example I have a plot that looks like this:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  fig, ax = plt.subplots()
  ax.plot(range(1,6), range(5))
  plt.xticks(range(1,6), ['a','b','c','d','e']
  </code></pre>
  
  <p>and I want to change the labels on the x axis to <code>['(a)','(b)','(c)','(d)','(e)']</code></p>
  
  <p>what is the simplest/best way to do this? I've tried things like:</p>
  
  <pre><code>labels = ['(%s)' % l for l in ax.xaxis.get_ticklabels()]
  ax.xaxis.set_ticklabels(labels)
  </code></pre>
  
  <p>but <code>ax.xaxis.get_ticklabels()</code> returns matplotlib Text objects as opposed to a list of strings and I'm not sure how to go about modifying them. I also tried using <code>matplotlib.ticker.FuncFormatter</code> but could only get a hold of the numeric positions not the labels themselves. Any would be appreciated.</p>