Reputation: 3086
Following my previous question how to draw several box plots, now I am wondering how transpose the factor plot and instead of having 1x5 pictures
I need to get it as 5x1.
How to vertically align the factorplot?
Upvotes: 0
Views: 1307
Reputation: 339570
For a seaborn boxplot you need to use the row
argument to supply the quantity to map along the rows, instead of the col
argument.
import seaborn as sns
import matplotlib.pyplot as plt
titanic = sns.load_dataset("titanic")
g = sns.factorplot(y="age", x="embark_town",
hue="sex", row="class",
data=titanic[titanic.embark_town.notnull()],
orient="v", kind="box", size=3)
plt.show()
Upvotes: 2