title: Change x-axis order of labels in Pandas / Matplotlib histogram?
body: <p>Suppose I have a Pandas dataframe with discrete values in a column.</p>
  <pre class="lang-py prettyprint-override"><code>import pandas as pd
  
  data = ['A']*2 + ['C']*3 + ['B']* 1
  print(data)
  # ['A', 'A', 'C', 'C', 'C', 'B']
  
  my_df = pd.DataFrame({'mycolumn': data})
  print(my_df)
  #   mycolumn
  # 0        A
  # 1        A
  # 2        C
  # 3        C
  # 4        C
  # 5        B
  </code></pre>
  <p>I then create a histogram showing the frequency of those values. I use the Pandas built-in function <code>hist()</code>, which in turn relies on the Matplotlib histogram function.</p>
  <pre><code>my_df.mycolumn.hist()
  </code></pre>
  <p><a href="https://i.stack.imgur.com/Xo9F9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Xo9F9.png" alt="enter image description here" /></a></p>
  <p>Now, <strong>how do I change the order of the labels on the X-axis to have a specific order?</strong> For example, I want the x-axis to have the labels in the specific order: <code>C, A, B</code>, not <code>A, C, B</code> as is shown.</p>
  <p>Additionally, <strong>how do I change the y-axis to be integers rather than floats?</strong> The frequency values are discrete counts.</p>