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
Contact Us