Adding ticks

We can add ticks to the plot by setting style to ticks, as shown in the following code:

sns.set()sns.set_style("ticks")sns.boxplot(data=df);

The preceding code should give us the following output:

Here, we have also demonstrated how to create a box plot, which is done by calling the boxplot method from seaborn.

Get Mastering Exploratory Analysis with pandas now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.