How to plot violin plot in Seaborn

You can plot the violin plot in Seaborn with the following code. The given example helps you to understand how to make a violin plot in Python using Seaborn. I highly recommend you “Python Crash Course Book” to learn Python.

Example: Violin Plot

# Import the required libraries
import seaborn as sns
import matplotlib.pyplot as plt
    
# Load the Dataset
dataset = sns.load_dataset("iris")
    
sns.violinplot(x ="species",y ="sepal_width", data = dataset)

# Display the plot
plt.show()

Leave a Comment

Your email address will not be published.