I was trying to create visualize a variable using sns.distplot() and sns.boxplot()
I got this result:
Apparently,first subplot is skipped.Does anyone know why this is happening?
I was trying to create visualize a variable using sns.distplot() and sns.boxplot()
I got this result:
Apparently,first subplot is skipped.Does anyone know why this is happening?
The reason you are seeing the displot outside is because it is a figure-level function and you cannot use ax in it. You can change it to histplot and should see it working...
fig, axes = plt.subplots(2,1,figsize=(5,5))
sns.histplot(wine['fixed acidity'], ax=axes[0])
sns.boxplot(wine['fixed acidity'], ax=axes[1])
Plot