1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| f, axes = plt.subplots(nrows=2, ncols=2, figsize=(10,10))
plt.subplot(2,2,1) gender=sns.countplot(x="Sex",hue="Survived",data=train_data,palette="Pastel1") plt.xlabel("Sex") plt.title("Survived of Sex")
plt.subplot(2,2,2) gender=sns.countplot(x="SibSp",hue="Survived",data=train_data,palette="Pastel1") plt.xlabel("SibSp") plt.title("Survived of SibSp")
plt.subplot(2,2,3) gender=sns.countplot(x="Embarked",hue="Survived",data=train_data,palette="Pastel1") plt.xlabel("Embarked") plt.title("Survived of Embarked")
plt.subplot(2,2,4) gender=sns.countplot(x="Pclass",hue="Survived",data=train_data,palette="Pastel1") plt.xlabel("Pclass") plt.title("Survived of Pclass")
|