Setting the background to white

We can also set the plot's background to solid white, and with no grid, with the following code:

sns.set()sns.set_style("white")sns.swarmplot(x='country', y='wine_servings', data=df);

The output is as follows:

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.