Seaborn Title

  • Post category:Seaborn

In this Seaborn tutorial, you will learn how to set the Seaborn title. You can use plt.title() to add a title to the plot.

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

# load the dataset
var = sns.load_dataset('iris')

# set the theme
sns.set_theme(style = 'darkgrid')

# create a box plot using seaborn
sns.boxplot(x = 'species', y = 'sepal_length', data = var)

# set the title of the plot
plt.title('Box Plot')

# show the plot
plt.show()

Output:

Seaborn Title

Free resources to learn advanced skills: AiHints and CodeAllow