Controlling figure aesthetics
Drawing attractive figures is important. When making figures for yourself, as you explore a dataset, it’s nice to have plots that are pleasant to look at. Visualizations are also central to communicating quantitative insights to an audience, and in that setting it’s even more necessary to have figures that catch the attention and draw a viewer in.
Matplotlib is highly customizable, but it can be hard to know what settings to tweak to achieve an attractive plot. Seaborn comes with a number of customized themes and a high-level interface for controlling the look of matplotlib figures.
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
Let’s define a simple function to plot some offset sine waves, which will help us see the different stylistic parameters we can tweak.
def sinplot

