I can plot a normal bar plot with searborn, but when i specify orient = 'h' nothing shows up in my plot.
orient = 'h'
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 :
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')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.