Seaborn Plot Size

  • Post category:Seaborn

In this Seaborn tutorial, you will learn how to change the Seaborn plot size. We have to use plt.figure() to increase the plot size.

# Import the required modules
import matplotlib.pyplot as plt
import seaborn as sns

# Load the data
data = sns.load_dataset('iris')

# Set the plot size
plt.figure(figsize=(12, 6))

# Plot the bar chart
sns.barplot(x='species', y='sepal_width', data=data)

# title
plt.title('Bar Chart')

# Show the plot
plt.show()

Output:

Seaborn Plot Size

Free resources to learn advanced skills: AiHints and CodeAllow