title: Seaborn Boxplot: get the xtick labels
body: <p>I am using Seaborn to make a boxplot using data from a pandas dataframe.</p>
  
  <pre><code>colorpalette = sns.hls_palette(8,h=.9)
  g = sns.boxplot(x="estimator", y="mean_score", data=dFrame, palette=colorpalette)
  
  g.set(ylabel='Mean Accuracy', xlabel='')
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/ycfbv.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ycfbv.png" alt="enter image description here"></a></p>
  
  <p>This results me in the previous figure. As you can see the ticklabels are too long to be in one line. So, I plan to use textwrap on the xticklabels to span them over multiple rows. In order to get the labels, I tried using</p>
  
  <pre><code>g.xaxis.get_ticklabels()
  </code></pre>
  
  <p>Returns me the following</p>
  
  <pre><code>&lt;a list of 9 Text major ticklabel objects&gt;
  </code></pre>
  
  <p>If I try it in a loop like this</p>
  
  <pre><code>for item in g.xaxis.get_ticklabels():
      print(item)
  </code></pre>
  
  <p>I get the following output</p>
  
  <pre><code>Text(0,0,'ExtraTreesClassifier')
  Text(1,0,'RandomForestClassifier')
  Text(2,0,'GradientBoostingClassifier')
  Text(3,0,'LogisticRegression')
  Text(4,0,'DecisionTreeClassifier')
  Text(5,0,'kNearestNeighbors')
  Text(6,0,'LinearSVC')
  Text(7,0,'Perceptron')
  </code></pre>
  
  <p>Is there a way to do it more efficiently using default functions/methods in seaborn.</p>