Sequential

In sequential palettes color moved sequentially from a lighter to a darker. When the variable assigned to be colored is numeric or has inherently ordered values, then it can be depicted with a sequential palette as shown in figure.

Example:

Python3




from matplotlib import pyplot as plt
import seaborn as sns
current_palette = sns.color_palette()
sns.palplot(sns.color_palette("Greys"))
plt.show()


Output:

Seaborn – Color Palette

In this article, We are going to see seaborn color_palette(), which can be used for coloring the plot. Using the palette we can generate the point with different colors. In this below example we can see the palette can be responsible for generating the different colormap values.

Syntax: seaborn.color_palette(palette=None, n_colors=None, desat=None)

Parameters:

  • palette: Name of palette or None to return current palette. 
  • n_colors: Number of colors in the palette.
  • desat: Proportion to desaturate each color.

Returns: list of RGB tuples or matplotlib.colors.Colormap

We will classify the different ways for using color_palette() types −

  • Qualitative
  • Sequential
  • Diverging

Similar Reads

Qualitative

A qualitative palette is used when the variable is categorical in nature, the color assigned to each group need to be distinct. Each possible value of the variable is assigned one color from a qualitative palette within a plot as shown in figure....

Sequential

...

Diverging

In sequential palettes color moved sequentially from a lighter to a darker. When the variable assigned to be colored is numeric or has inherently ordered values, then it can be depicted with a sequential palette as shown in figure....

Contact Us