This style of plot was originally named a “letter value” plot because it
shows a large number of quantiles that are defined as “letter values”. It
is similar to a box plot in plotting a nonparametric representation of a
distribution in which all features correspond to actual observations. By
plotting more quantiles, it provides more information about the shape of
the distribution, particularly in the tails.
data : DataFrame, Series, dict, array, or list of arrays
Dataset for plotting. If x and y are absent, this is
interpreted as wide-form. Otherwise it is expected to be long-form.
x, y, hue : names of variables in data or vector data
Inputs for plotting long-form data. See examples for interpretation.
order, hue_order : lists of strings
Order to plot the categorical levels in; otherwise the levels are
inferred from the data objects.
orient : “v” | “h” | “x” | “y”
Orientation of the plot (vertical or horizontal). This is usually
inferred based on the type of the input variables, but it can be used
to resolve ambiguity when both x and y are numeric or when
plotting wide-form data.
color : matplotlib color
Single color for the elements in the plot.
palette : palette name, list, or dict
Colors to use for the different levels of the hue variable. Should
be something that can be interpreted by color_palette(), or a
dictionary mapping hue levels to matplotlib colors.
saturation : float
Proportion of the original saturation to draw fill colors in. Large
patches often look better with desaturated colors, but set this to
1 if you want the colors to perfectly match the input values.
fill : bool
If True, use a solid patch. Otherwise, draw as line art.
dodge : “auto” or bool
When hue mapping is used, whether elements should be narrowed and shifted along
the orient axis to eliminate overlap. If "auto", set to True when the
orient variable is crossed with the categorical variable or False otherwise.
width : float
Width allotted to each element on the orient axis. When native_scale=True,
it is relative to the minimum distance between two values in the native scale.
gap : float
Shrink on the orient axis by this factor to add a gap between dodged elements.
linewidth : float
Width of the lines that frame the plot elements.
linecolor : color
Color to use for line elements, when fill is True.
width_method : {“exponential”, “linear”, “area”}
Method to use for the width of the letter value boxes:
"exponential": Represent the corresponding percentile
"linear": Decrease by a constant amount for each box
"area": Represent the density of data points in that box
k_depth : {“tukey”, “proportion”, “trustworthy”, “full”} or int
The number of levels to compute and draw in each tail:
"tukey": Use log2(n) - 3 levels, covering similar range as boxplot whiskers
"proportion": Leave approximately outlier_prop fliers
"trusthworthy": Extend to level with confidence of at least trust_alpha
"full": Use log2(n) + 1 levels and extend to most extreme points
outlier_prop : float
Proportion of data expected to be outliers; used when k_depth="proportion".
trust_alpha : float
Confidence threshold for most extreme level; used when k_depth="trustworthy".
Normalization in data units for colormap applied to the hue
variable when it is numeric. Not relevant if hue is categorical.
log_scale : bool or number, or pair of bools or numbers
Set axis scale(s) to log. A single value sets the data axis for any numeric
axes in the plot. A pair of values sets each axis independently.
Numeric values are interpreted as the desired base (default 10).
When None or False, seaborn defers to the existing Axes scale.
native_scale : bool
When True, numeric or datetime values on the categorical axis will maintain
their original scaling rather than being converted to fixed indices.
formatter : callable
Function for converting categorical data into strings. Affects both grouping
and tick labels.
legend : “auto”, “brief”, “full”, or False
How to draw the legend. If “brief”, numeric hue and size
variables will be represented with a sample of evenly spaced values.
If “full”, every group will get an entry in the legend. If “auto”,
choose between brief or full representation based on number of levels.
If False, no legend data is added and no legend is drawn.
Group by another variable, representing it by the color of the boxes. By default, each boxen plot will be “dodged” so that they don’t overlap; you can also add a small gap between them:
The default rule for choosing each box width represents the percentile covered by the box. Alternatively, you can reduce each box width by a linear factor:
There are several different approaches for choosing the number of boxes to draw, including a rule based on the confidence level of the percentie estimate:
The linecolor and linewidth parameters control the outlines of the boxes, while the line_kws parameter controls the line representing the median and the flier_kws parameter controls the appearance of the outliers: