Reputation: 8055
I can plot a normal bar plot with searborn, but when i specify orient = 'h'
nothing shows up in my plot.
df = pd.DataFrame(['A','A','A','B','B','C'],columns = ['letters'])
data =df.letters.value_counts()
sns.barplot(x = data.index, y = data)
With orient:
Upvotes: 0
Views: 3698
Reputation: 1594
You have to swap x and y when you change orientation.
df = pd.DataFrame(['A','A','A','B','B','C'],columns = ['letters'])
data =df.letters.value_counts()
sns.barplot(y = data.index, x = data, orient='h')
Upvotes: 6