API reference

Relational plots

relplot

Figure-level interface for drawing relational plots onto a FacetGrid.

scatterplot

Draw a scatter plot with possibility of several semantic groupings.

lineplot

Draw a line plot with possibility of several semantic groupings.

Distribution plots

displot

Figure-level interface for drawing distribution plots onto a FacetGrid.

histplot

Plot univariate or bivariate histograms to show distributions of datasets.

kdeplot

Plot univariate or bivariate distributions using kernel density estimation.

ecdfplot

Plot empirical cumulative distribution functions.

rugplot

Plot marginal distributions by drawing ticks along the x and y axes.

distplot

DEPRECATED: Flexibly plot a univariate distribution of observations.

Categorical plots

catplot

Figure-level interface for drawing categorical plots onto a FacetGrid.

stripplot

Draw a scatterplot where one variable is categorical.

swarmplot

Draw a categorical scatterplot with non-overlapping points.

boxplot

Draw a box plot to show distributions with respect to categories.

violinplot

Draw a combination of boxplot and kernel density estimate.

boxenplot

Draw an enhanced box plot for larger datasets.

pointplot

Show point estimates and confidence intervals using scatter plot glyphs.

barplot

Show point estimates and confidence intervals as rectangular bars.

countplot

Show the counts of observations in each categorical bin using bars.

Regression plots

lmplot

Plot data and regression model fits across a FacetGrid.

regplot

Plot data and a linear regression model fit.

residplot

Plot the residuals of a linear regression.

Matrix plots

heatmap

Plot rectangular data as a color-encoded matrix.

clustermap

Plot a matrix dataset as a hierarchically-clustered heatmap.

Multi-plot grids

Facet grids

FacetGrid

Multi-plot grid for plotting conditional relationships.

Pair grids

pairplot

Plot pairwise relationships in a dataset.

PairGrid

Subplot grid for plotting pairwise relationships in a dataset.

Joint grids

jointplot

Draw a plot of two variables with bivariate and univariate graphs.

JointGrid

Grid for drawing a bivariate plot with marginal univariate plots.

Themeing

set_theme

Set aspects of the visual theme for all matplotlib and seaborn plots.

axes_style

Get the parameters that control the general style of the plots.

set_style

Set the parameters that control the general style of the plots.

plotting_context

Get the parameters that control the scaling of plot elements.

set_context

Set the parameters that control the scaling of plot elements.

set_color_codes

Change how matplotlib color shorthands are interpreted.

reset_defaults

Restore all RC params to default settings.

reset_orig

Restore all RC params to original settings (respects custom rc).

set

Alias for set_theme(), which is the preferred interface.

Color palettes

set_palette

Set the matplotlib color cycle using a seaborn palette.

color_palette

Return a list of colors or continuous colormap defining a palette.

husl_palette

Get a set of evenly spaced colors in HUSL hue space.

hls_palette

Get a set of evenly spaced colors in HLS hue space.

cubehelix_palette

Make a sequential palette from the cubehelix system.

dark_palette

Make a sequential palette that blends from dark to color.

light_palette

Make a sequential palette that blends from light to color.

diverging_palette

Make a diverging palette between two HUSL colors.

blend_palette

Make a palette that blends between a list of colors.

xkcd_palette

Make a palette with color names from the xkcd color survey.

crayon_palette

Make a palette with color names from Crayola crayons.

mpl_palette

Return discrete colors from a matplotlib palette.

Palette widgets

choose_colorbrewer_palette

Select a palette from the ColorBrewer set.

choose_cubehelix_palette

Launch an interactive widget to create a sequential cubehelix palette.

choose_light_palette

Launch an interactive widget to create a light sequential palette.

choose_dark_palette

Launch an interactive widget to create a dark sequential palette.

choose_diverging_palette

Launch an interactive widget to choose a diverging color palette.

Utility functions

despine

Remove the top and right spines from plot(s).

move_legend

Recreate a plot’s legend at a new location.

saturate

Return a fully saturated color with the same hue.

desaturate

Decrease the saturation channel of a color by some percent.

set_hls_values

Independently manipulate the h, l, or s channels of a color.

load_dataset

Load an example dataset from the online repository (requires internet).

get_dataset_names

Report available example datasets, useful for reporting issues.

get_data_home

Return a path to the cache directory for example datasets.