#31 Horizontal boxplot with seaborn






It is quite straight forward to turn your boxplot horizontal with seaborn. You can switch your x and y attributes, or use the option ‘orient=”h”






# library & dataset
import seaborn as sns
df = sns.load_dataset('iris')

# Just switch x and y
sns.boxplot( y=df["species"], x=df["sepal_length"] )

Leave a Reply

Your email address will not be published.