Changing the color palette

Let's move on and change the color palette to see how it impacts the plot's colors. The following code sets the color palette to bright (one of seaborn's predefined palettes):


Let's see how it changes our plot's colors with the following command:


The output should now look like the following screenshot:

As you can see, our plot's color scheme has completely changed due to the new palette we set. bright is not the only predefined color palette in seaborn; there are a few others, including deep, muted, pastel, bright, dark, and colorblind, as follows:

sns.palplot(sns.color_palette("deep", ...

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.