API reference#
Objects interface#
Plot object#
An interface for declaratively specifying statistical graphics. |
Mark objects#
Dot marks
A mark suitable for dot plots or less-dense scatterplots. |
|
A dot mark defined by strokes to better handle overplotting. |
Line marks
A mark connecting data points with sorting along the orientation axis. |
|
A faster but less-flexible mark for drawing many lines. |
|
A mark connecting data points in the order they appear. |
|
A faster but less-flexible mark for drawing many paths. |
|
A line mark drawn as an oriented segment for each datapoint. |
|
An oriented line mark drawn between min/max values. |
Bar marks
A bar mark drawn between baseline and data values. |
|
A faster bar mark with defaults more suitable histograms. |
Fill marks
A fill mark drawn from a baseline to data values. |
|
A fill mark representing an interval between values. |
Text marks
A textual mark to annotate or represent data values. |
Stat objects#
Aggregate data along the value axis using given method. |
|
Calculate a point estimate and error bar interval. |
|
Count distinct observations within groups. |
|
Bin observations, count them, and optionally normalize or cumulate. |
|
Compute a univariate kernel density estimate. |
|
Replace observations with percentile values. |
|
Fit a polynomial of the given order and resample data onto predicted curve. |
Move objects#
Displacement and narrowing of overlapping marks along orientation axis. |
|
Random displacement along one or both axes to reduce overplotting. |
|
Divisive scaling on the value axis after aggregating within groups. |
|
Displacement of overlapping bar or area marks along the value axis. |
|
Displacement of all marks with the same magnitude / direction. |
Scale objects#
A scale with a discrete domain of True and False values. |
|
A numeric scale supporting norms and functional transforms. |
|
A categorical scale without relative importance / magnitude. |
|
A scale for date/time data. |
Base classes#
Base class for objects that visually represent data. |
|
Base class for objects that apply statistical transformations. |
|
Base class for objects that apply simple positional transforms. |
|
Base class for objects that map data values to visual properties. |
Function interface#
Relational plots#
Figure-level interface for drawing relational plots onto a FacetGrid. |
|
Draw a scatter plot with possibility of several semantic groupings. |
|
Draw a line plot with possibility of several semantic groupings. |
Distribution plots#
Figure-level interface for drawing distribution plots onto a FacetGrid. |
|
Plot univariate or bivariate histograms to show distributions of datasets. |
|
Plot univariate or bivariate distributions using kernel density estimation. |
|
Plot empirical cumulative distribution functions. |
|
Plot marginal distributions by drawing ticks along the x and y axes. |
|
DEPRECATED |
Categorical plots#
Figure-level interface for drawing categorical plots onto a FacetGrid. |
|
Draw a categorical scatterplot using jitter to reduce overplotting. |
|
Draw a categorical scatterplot with points adjusted to be non-overlapping. |
|
Draw a box plot to show distributions with respect to categories. |
|
Draw a combination of boxplot and kernel density estimate. |
|
Draw an enhanced box plot for larger datasets. |
|
Show point estimates and errors using dot marks. |
|
Show point estimates and errors as rectangular bars. |
|
Show the counts of observations in each categorical bin using bars. |
Regression plots#
Plot data and regression model fits across a FacetGrid. |
|
Plot data and a linear regression model fit. |
|
Plot the residuals of a linear regression. |
Matrix plots#
Plot rectangular data as a color-encoded matrix. |
|
Plot a matrix dataset as a hierarchically-clustered heatmap. |
Multi-plot grids#
Facet grids#
Multi-plot grid for plotting conditional relationships. |
Pair grids#
Plot pairwise relationships in a dataset. |
|
Subplot grid for plotting pairwise relationships in a dataset. |
Joint grids#
Draw a plot of two variables with bivariate and univariate graphs. |
|
Grid for drawing a bivariate plot with marginal univariate plots. |
Themeing#
Set aspects of the visual theme for all matplotlib and seaborn plots. |
|
Get the parameters that control the general style of the plots. |
|
Set the parameters that control the general style of the plots. |
|
Get the parameters that control the scaling of plot elements. |
|
Set the parameters that control the scaling of plot elements. |
|
Change how matplotlib color shorthands are interpreted. |
|
Restore all RC params to default settings. |
|
Restore all RC params to original settings (respects custom rc). |
|
Alias for |
Color palettes#
Set the matplotlib color cycle using a seaborn palette. |
|
Return a list of colors or continuous colormap defining a palette. |
|
Return hues with constant lightness and saturation in the HUSL system. |
|
Return hues with constant lightness and saturation in the HLS system. |
|
Make a sequential palette from the cubehelix system. |
|
Make a sequential palette that blends from dark to |
|
Make a sequential palette that blends from light to |
|
Make a diverging palette between two HUSL colors. |
|
Make a palette that blends between a list of colors. |
|
Make a palette with color names from the xkcd color survey. |
|
Make a palette with color names from Crayola crayons. |
|
Return a palette or colormap from the matplotlib registry. |
Palette widgets#
Select a palette from the ColorBrewer set. |
|
Launch an interactive widget to create a sequential cubehelix palette. |
|
Launch an interactive widget to create a light sequential palette. |
|
Launch an interactive widget to create a dark sequential palette. |
|
Launch an interactive widget to choose a diverging color palette. |
Utility functions#
Remove the top and right spines from plot(s). |
|
Recreate a plot's legend at a new location. |
|
Return a fully saturated color with the same hue. |
|
Decrease the saturation channel of a color by some percent. |
|
Independently manipulate the h, l, or s channels of a color. |
|
Load an example dataset from the online repository (requires internet). |
|
Report available example datasets, useful for reporting issues. |
|
Return a path to the cache directory for example datasets. |