Pandas DataFrame bar plot with sort_values by other column
<p>I have a Pandas DataFrame. I want to plot two columns' values with bar plot, and the bar plot sorts values by the other column.</p>

<p>For example, I want to sort values in descending order by column <code>a_b</code>(sum of column <code>a</code> and <code>b</code>).
In addition, the xlabel is rotated, I want to fix it.</p>

<p>Your help would be appreciated.</p>

<pre><code>import pandas as pd
%matplotlib inline
a = pd.Series([4,8,6,7,8,3,9,7])
b = pd.Series([3,6,8,3,4,6,10,4])
a_b = a+b
df = pd.concat([a,b,a_b],axis=1,join='inner')
df.columns = ['a','b','c']

df[['a','b']].sort_values(by='a',ascending=False).plot(kind='bar',stacked=True)
</code></pre>

<p><a href="https://i.stack.imgur.com/Rb2xU.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Rb2xU.png" alt="enter image description here"></a></p>