Hi,
The code in IPython notebook:
%matplotlib inline
import pandas as pd
import seaborn as sns
df = pd.DataFrame([[2], [2], [1], [1], [1], [3]])
sns.countplot(x=0, data=df, orient='v')
sns.countplot(x=0, data=df, orient='h')
produces exactly the same output plots. This means that the option for orienting is not working.
You have to do
sns.countplot(y=0, data=df)
(that is, y=0 instead of x=0. When plotting with long-form data, the assignment of variables in the dataframe to plot axes supersedes the orient keyword argument.
Thanks a lot, I did not expected :).
Hey, thanks a lot. It helped me today!
Worked like a charm! Thanks :)
helped me too...... THANKS.... :)
Most helpful comment
You have to do
(that is,
y=0instead ofx=0. When plotting with long-form data, the assignment of variables in the dataframe to plot axes supersedes theorientkeyword argument.