Plotting context presets

Seaborn also provides some preset style context. For example, the default style context we have been using so far is called notebook. However, there are a few more, including one called paper. This context is set using a method called set_context, where we pass paper as the parameter, as follows:

sns.set()sns.set_context("paper")sns.lmplot(x='beer_servings', y='wine_servings', data=df);

The output for the previous code will be as follows:

There are a few more contexts available; for example, one called talk. We can set that context with talk, as follows:

sns.set()sns.set_context("talk")plt.figure(figsize=(8, 6))sns.lmplot(x='beer_servings', ...

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.