Back to Seaborn

Mpl Palette

doc/_docstrings/mpl_palette.ipynb

0.13.2379 B
Original Source
python
import seaborn as sns
sns.set_theme()
sns.palettes._patch_colormap_display()

Return discrete samples from a continuous matplotlib colormap:

python
sns.mpl_palette("viridis")
python
sns.mpl_palette("viridis", as_cmap=True)
python
sns.mpl_palette("viridis", 8)
python
sns.mpl_palette("Set2")
python
sns.mpl_palette("Set2", 10)