I am working with the iris dataset.
I would like to plot, for each one of the four variables, in the dataset a violin plot and a boxplot per row.
variables=['SepalLengthCm','SepalWidthCm','PetalLengthCm','PetalWidthCm']
for var in variables:
sns.boxplot(x = 'Species', y = var, data = iris)
plt.show()
sns.violinplot(x='Species', y=var, data= iris)
plt.show()
sns.pairplot(iris, hue="Species")
plt.show()
I have used the code above and each figure appears in a row.
May somebody help me with the subplotting to order the figures and get a matrix 4(number of variables) x 2 (chars per variable)?
Thank in advance.